Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -28,7 +28,8 @@
|
|||||||
return {
|
return {
|
||||||
component: 'WorkReport',
|
component: 'WorkReport',
|
||||||
configList: [],
|
configList: [],
|
||||||
currIndex: 0
|
currIndex: 0,
|
||||||
|
albumId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -47,7 +48,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad () {
|
onLoad (query) {
|
||||||
|
this.albumId = query.id || ''
|
||||||
this.getConfig()
|
this.getConfig()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -62,7 +64,7 @@
|
|||||||
|
|
||||||
save () {
|
save () {
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$refs.reportItem.screenshot().then(canvas => {
|
this.$refs.reportItem.screenshot() && this.$refs.reportItem.screenshot().then(canvas => {
|
||||||
let dataURL = canvas.toDataURL('image/png')
|
let dataURL = canvas.toDataURL('image/png')
|
||||||
const file = this.dataURLtoFile(dataURL, 'photo.png')
|
const file = this.dataURLtoFile(dataURL, 'photo.png')
|
||||||
let formData = new FormData()
|
let formData = new FormData()
|
||||||
@@ -71,7 +73,7 @@
|
|||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
const data = this.configList[this.currIndex]
|
const data = this.configList[this.currIndex]
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `./ReportImg?img=${res.data.url}&type=${data.watermarkType}&templateId=${data.id}`
|
url: `./ReportImg?albumId=${this.albumId}&img=${res.data.url}&type=${data.watermarkType}&templateId=${data.id}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="photo">
|
<div class="photo" v-if="pageShow">
|
||||||
<div class="photo-header">
|
<div class="photo-header">
|
||||||
<image :src="coverImg" mode="aspectFill" />
|
<h2>{{ info.albumName }}</h2>
|
||||||
<div>
|
<div class="right" @click="linkTo('./AddAlbum?id=' + id)" hover-class="text-hover" v-if="id !== '1'">
|
||||||
<h2>{{ info.albumName }}</h2>
|
<image src="./images/setting.png" />
|
||||||
<span @click="linkTo('./AddAlbum?id=' + id)">相册设置</span>
|
<span>相册设置</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="photo-info">
|
<div class="photo-info">
|
||||||
@@ -27,23 +27,26 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="photo-list">
|
<div class="photo-list">
|
||||||
<div class="photo-title">
|
<div class="photo-title">
|
||||||
<h2>照片列表</h2>
|
<div class="left">
|
||||||
<div class="right">
|
|
||||||
<picker mode="date" @change="onChange">
|
<picker mode="date" @change="onChange">
|
||||||
<div class="right-item">
|
<div class="left-item">
|
||||||
<span>{{ date || '所有日期' }}</span>
|
<span>{{ date || '所有日期' }}</span>
|
||||||
<image src="./images/down.png" />
|
<image src="./images/down.png" />
|
||||||
</div>
|
</div>
|
||||||
</picker>
|
</picker>
|
||||||
<div class="right-item" style="margin-right: 0;" @click="toChoose">
|
<div class="left-item" style="margin-right: 0;" @click="toChoose">
|
||||||
<span v-if="userId"><AiOpenData v-if="userId" type="userName" :openid="userId"></AiOpenData></span>
|
<span v-if="userId"><AiOpenData v-if="userId" type="userName" :openid="userId"></AiOpenData></span>
|
||||||
<span v-else>所有干部</span>
|
<span v-else>所有干部</span>
|
||||||
<image src="./images/down.png" />
|
<image src="./images/down.png" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="right" hover-class="text-hover" @click="toEdit">
|
||||||
|
<image src="./images/edit.png" />
|
||||||
|
<span>编辑照片</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="photo-item__wrapper">
|
<div class="photo-item__wrapper">
|
||||||
<div class="photo-item" @click="linkTo('./Photo?url=' + item.photoUrl + '&id=' + item.id)" v-for="(item, index) in list" :key="index">
|
<div class="photo-item" @click="linkTo('./Photo?id=' + item.id)" v-for="(item, index) in list" :key="index">
|
||||||
<image :src="item.photoUrl" mode="aspectFill" />
|
<image :src="item.photoUrl" mode="aspectFill" />
|
||||||
<div class="photo-item__text">
|
<div class="photo-item__text">
|
||||||
<h2><AiOpenData v-if="item.createUserId" type="userName" :openid="item.createUserId"></AiOpenData></h2>
|
<h2><AiOpenData v-if="item.createUserId" type="userName" :openid="item.createUserId"></AiOpenData></h2>
|
||||||
@@ -54,7 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-wrapper">
|
<div class="btn-wrapper">
|
||||||
<div class="btn" hover-class="text-hover" @click="toEdit">编辑照片</div>
|
<div class="btn" @click="linkTo('./AddReport?id=' + id)">上传拼图汇报</div>
|
||||||
<div class="btn" @click="toAddImg" hover-class="text-hover">上传照片</div>
|
<div class="btn" @click="toAddImg" hover-class="text-hover">上传照片</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -74,7 +77,6 @@
|
|||||||
info: {},
|
info: {},
|
||||||
name: '',
|
name: '',
|
||||||
date: '',
|
date: '',
|
||||||
coverImg: '',
|
|
||||||
imgList: [],
|
imgList: [],
|
||||||
hideStatus: false,
|
hideStatus: false,
|
||||||
pageShow: false,
|
pageShow: false,
|
||||||
@@ -140,7 +142,7 @@
|
|||||||
fromDepartmentId: 0,
|
fromDepartmentId: 0,
|
||||||
mode: 'single',
|
mode: 'single',
|
||||||
selectedOpenUserIds: this.userId ? [this.userId] : ''
|
selectedOpenUserIds: this.userId ? [this.userId] : ''
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if (res.userList && res.userList) {
|
if (res.userList && res.userList) {
|
||||||
@@ -179,10 +181,13 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
getInfo (id) {
|
getInfo (id) {
|
||||||
|
this.$loading()
|
||||||
this.$http.post(`/api/appalbum/queryDetailById?id=${id}`).then(res => {
|
this.$http.post(`/api/appalbum/queryDetailById?id=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.info = res.data
|
this.info = res.data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.pageShow = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -235,10 +240,6 @@
|
|||||||
this.list = res.data.records
|
this.list = res.data.records
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.data.records.length && !this.coverImg) {
|
|
||||||
this.coverImg = res.data.records[0].photoUrl
|
|
||||||
}
|
|
||||||
|
|
||||||
if (res.data.records.length < 10) {
|
if (res.data.records.length < 10) {
|
||||||
this.isMore = true
|
this.isMore = true
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
@@ -262,7 +263,9 @@
|
|||||||
|
|
||||||
<style lang="scss" socped>
|
<style lang="scss" socped>
|
||||||
.photo {
|
.photo {
|
||||||
|
min-height: 100vh;
|
||||||
padding-bottom: 130px;
|
padding-bottom: 130px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -330,11 +333,11 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.right-item {
|
.left-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: 32px;
|
margin-right: 32px;
|
||||||
@@ -351,49 +354,56 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 26px;
|
||||||
|
color: #333;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.photo-header {
|
.photo-header {
|
||||||
position: relative;
|
display: flex;
|
||||||
height: 400px;
|
align-items: center;
|
||||||
background: rgba(0,0,0, 0.7);
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
height: 148px;
|
||||||
|
padding: 0 32rpx;
|
||||||
|
color: #Fff;
|
||||||
|
background: #3975C6;
|
||||||
|
|
||||||
div {
|
div {
|
||||||
position: relative;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
z-index: 1;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
width: 216px;
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
|
||||||
width: 176px;
|
|
||||||
height: 56px;
|
height: 56px;
|
||||||
line-height: 56px;
|
line-height: 56px;
|
||||||
margin-top: 16px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: rgba(0, 0, 0, 0.6);
|
justify-content: center;
|
||||||
color: #fff;
|
|
||||||
border-radius: 28px;
|
border-radius: 28px;
|
||||||
|
font-size: 28px;
|
||||||
|
background: #285DA4;
|
||||||
}
|
}
|
||||||
|
|
||||||
image {
|
image {
|
||||||
position: absolute;
|
width: 32px;
|
||||||
z-index: 1;
|
height: 32px;
|
||||||
left: 0;
|
margin-right: 8px;
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 400px;
|
|
||||||
filter: blur(2px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 20px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 56px;
|
font-size: 38px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,8 +411,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 168px;
|
height: 168px;
|
||||||
background: #FFFFFF;
|
background: #3975C6;
|
||||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
|
|
||||||
|
|
||||||
& > div {
|
& > div {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -411,12 +420,12 @@
|
|||||||
h2 {
|
h2 {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 38px;
|
font-size: 44px;
|
||||||
color: #333333;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: #999999;
|
color: #C3D5EE;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -438,7 +447,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn:first-child {
|
.btn:first-child {
|
||||||
width: 270px;
|
flex: 1;
|
||||||
height: 112px;
|
height: 112px;
|
||||||
line-height: 112px;
|
line-height: 112px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -206,14 +206,22 @@
|
|||||||
return this.$u.toast('请选择下班打卡时间')
|
return this.$u.toast('请选择下班打卡时间')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.$dayjs('2020-06-01 ' + this.form.workOutTime).valueOf() <= this.$dayjs('2020-06-01 ' + this.form.workInTime).valueOf()) {
|
||||||
|
return this.$u.toast('下班时间不能早于上班时间')
|
||||||
|
}
|
||||||
|
|
||||||
if (this.form.openRestTime === '1') {
|
if (this.form.openRestTime === '1') {
|
||||||
if (!this.form.restTimeBegin) {
|
if (!this.form.restTimeBegin) {
|
||||||
return this.$u.toast('请选择休息时间')
|
return this.$u.toast('请选择休息开始时间')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.form.restTimeEnd) {
|
if (!this.form.restTimeEnd) {
|
||||||
return this.$u.toast('请选择休息结束时间')
|
return this.$u.toast('请选择休息结束时间')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.$dayjs('2020-06-01 ' + this.form.restTimeEnd).valueOf() <= this.$dayjs('2020-06-01 ' + this.form.restTimeBegin).valueOf()) {
|
||||||
|
return this.$u.toast('休息结束时间不能早于休息开始时间')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.form.workInFrom) {
|
if (!this.form.workInFrom) {
|
||||||
@@ -224,6 +232,10 @@
|
|||||||
return this.$u.toast('请选择下班打卡最晚时间')
|
return this.$u.toast('请选择下班打卡最晚时间')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.$dayjs('2020-06-01 ' + this.form.workOutEnd).valueOf() <= this.$dayjs('2020-06-01 ' + this.form.workInFrom).valueOf()) {
|
||||||
|
return this.$u.toast('下班打卡最晚时间不能早于上班打卡最早时间')
|
||||||
|
}
|
||||||
|
|
||||||
if (this.form.openWorkPoint === '1' && !this.address.address) {
|
if (this.form.openWorkPoint === '1' && !this.address.address) {
|
||||||
return this.$u.toast('请选择固定打卡点')
|
return this.$u.toast('请选择固定打卡点')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,6 +193,10 @@
|
|||||||
return this.$u.toast('请选择最晚打卡时间')
|
return this.$u.toast('请选择最晚打卡时间')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.$dayjs('2020-06-01 ' + this.form.workOutEnd).valueOf() <= this.$dayjs('2020-06-01 ' + this.form.workInFrom).valueOf()) {
|
||||||
|
return this.$u.toast('最晚打卡时间不能最早打卡时间')
|
||||||
|
}
|
||||||
|
|
||||||
if (this.form.openRestTime === '1') {
|
if (this.form.openRestTime === '1') {
|
||||||
if (!this.form.restTimeBegin) {
|
if (!this.form.restTimeBegin) {
|
||||||
return this.$u.toast('请选择休息时间')
|
return this.$u.toast('请选择休息时间')
|
||||||
@@ -201,6 +205,10 @@
|
|||||||
if (!this.form.restTimeEnd) {
|
if (!this.form.restTimeEnd) {
|
||||||
return this.$u.toast('请选择休息结束时间')
|
return this.$u.toast('请选择休息结束时间')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.$dayjs('2020-06-01 ' + this.form.restTimeEnd).valueOf() <= this.$dayjs('2020-06-01 ' + this.form.restTimeBegin).valueOf()) {
|
||||||
|
return this.$u.toast('休息结束时间不能早于休息开始时间')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.form.workHoursLimit) {
|
if (!this.form.workHoursLimit) {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
<image src="./images/remove.png" @click="remove(index)" />
|
<image src="./images/remove.png" @click="remove(index)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tips">注:如选中人员未展示,可能是未授权该成员应用权限,需要先对这些成员进行应用授权。 </div>
|
||||||
<div class="form-btn" hover-class="text-hover" @click="save">保存</div>
|
<div class="form-btn" hover-class="text-hover" @click="save">保存</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -36,7 +36,12 @@
|
|||||||
|
|
||||||
onLoad (query) {
|
onLoad (query) {
|
||||||
this.id = query.id
|
this.id = query.id
|
||||||
this.img = query.url
|
|
||||||
|
this.$http.post(`/api/appalbumphoto/queryDetailById?id=${query.id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.img = res.data.photoUrl
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -91,6 +91,7 @@
|
|||||||
this.img = query.img
|
this.img = query.img
|
||||||
this.type = query.type
|
this.type = query.type
|
||||||
this.templateId = query.templateId
|
this.templateId = query.templateId
|
||||||
|
this.albumId = query.albumId
|
||||||
|
|
||||||
this.getWatermarkList()
|
this.getWatermarkList()
|
||||||
},
|
},
|
||||||
@@ -145,8 +146,17 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.albumName = this.albumList[0].label
|
if (this.albumId) {
|
||||||
this.albumId = this.albumList[0].value
|
this.albumName = this.albumList.filter((v, index) => {
|
||||||
|
if (v.value === this.albumId) {
|
||||||
|
this.currIndex = index
|
||||||
|
}
|
||||||
|
return v.value === this.albumId
|
||||||
|
})[0].label
|
||||||
|
} else {
|
||||||
|
this.albumName = this.albumList[0].label
|
||||||
|
this.albumId = this.albumList[0].value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<u-popup v-model="isShowAlbum" :closeable="false" border-radius="32" height="70%" mode="bottom">
|
<u-popup v-model="isShowAlbum" :closeable="false" border-radius="32" height="70%" mode="bottom">
|
||||||
<div class="album">
|
<div class="album">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<span @click="isShow = false">取消</span>
|
<span @click="isShowAlbum = false">取消</span>
|
||||||
<span @click="onConfirm">确定</span>
|
<span @click="onConfirm">确定</span>
|
||||||
</div>
|
</div>
|
||||||
<scroll-view scroll-y class="album-list__wrapper">
|
<scroll-view scroll-y class="album-list__wrapper">
|
||||||
|
|||||||
@@ -83,8 +83,7 @@
|
|||||||
countPhotoNo: '',
|
countPhotoNo: '',
|
||||||
countPhotographer: '',
|
countPhotographer: '',
|
||||||
list: [],
|
list: [],
|
||||||
msgInfo: {},
|
msgInfo: {}
|
||||||
userInfo: {}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: { ...mapState(['user']) },
|
computed: { ...mapState(['user']) },
|
||||||
@@ -118,7 +117,7 @@
|
|||||||
getUserInfo () {
|
getUserInfo () {
|
||||||
this.$http.post('/api/user/info').then(res => {
|
this.$http.post('/api/user/info').then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.userInfo = res.data
|
this.$store.commit('setUser', res.data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import html2canvas from 'html2canvas'
|
import html2canvas from 'html2canvas'
|
||||||
import RenderContent from './RenderContent.vue'
|
import RenderContent from './RenderContent.vue'
|
||||||
|
import { mapFieldLable } from './../../config'
|
||||||
export default {
|
export default {
|
||||||
name: 'Daily',
|
name: 'Daily',
|
||||||
label: '日报',
|
label: '日报',
|
||||||
@@ -119,6 +120,13 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
screenshot () {
|
screenshot () {
|
||||||
|
for (let i = 0; i < this.configList.length; i ++) {
|
||||||
|
if (['2', '3', '4', '5'].indexOf(this.configList[i].fieldType) === -1 && this.configList[i].fieldType && !this.configList[i].defaultValue && this.configList[i].status === '1') {
|
||||||
|
this.$u.toast(`请输入${mapFieldLable(this.config[i].type)}`)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const height = this.$refs.report.offsetHeight - this.$refs.add.offsetHeight
|
const height = this.$refs.report.offsetHeight - this.$refs.add.offsetHeight
|
||||||
|
|
||||||
return html2canvas(this.$refs.report, {
|
return html2canvas(this.$refs.report, {
|
||||||
@@ -141,26 +149,33 @@
|
|||||||
|
|
||||||
addPhoto () {
|
addPhoto () {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 9,
|
||||||
sizeType: ['compressed'],
|
sizeType: ['compressed'],
|
||||||
success: res => {
|
success: res => {
|
||||||
this.$loading()
|
res.tempFiles.forEach(v => {
|
||||||
let formData = new FormData()
|
this.upload(v)
|
||||||
formData.append('file', res.tempFiles[0])
|
|
||||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.richList.push({
|
|
||||||
type: 'img',
|
|
||||||
value: res.data.url
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$u.toast(res.msg)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
upload (img) {
|
||||||
|
let formData = new FormData()
|
||||||
|
formData.append('file', img)
|
||||||
|
|
||||||
|
this.$loading()
|
||||||
|
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.richList.push({
|
||||||
|
type: 'img',
|
||||||
|
value: res.data.url
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
confirm () {
|
confirm () {
|
||||||
if (!this.content) {
|
if (!this.content) {
|
||||||
return this.$u.toast('文本不能为空')
|
return this.$u.toast('文本不能为空')
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import html2canvas from 'html2canvas'
|
import html2canvas from 'html2canvas'
|
||||||
|
import { mapFieldLable } from './../../config'
|
||||||
import RenderContent from './RenderContent.vue'
|
import RenderContent from './RenderContent.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'InspectLog',
|
name: 'InspectLog',
|
||||||
@@ -128,6 +129,13 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
screenshot () {
|
screenshot () {
|
||||||
|
for (let i = 0; i < this.configList.length; i ++) {
|
||||||
|
if (['2', '3', '4', '5'].indexOf(this.configList[i].fieldType) === -1 && this.configList[i].fieldType && !this.configList[i].defaultValue && this.configList[i].status === '1') {
|
||||||
|
this.$u.toast(`请输入${mapFieldLable(this.config[i].type)}`)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const height = this.$refs.report.offsetHeight - this.$refs.add.offsetHeight
|
const height = this.$refs.report.offsetHeight - this.$refs.add.offsetHeight
|
||||||
|
|
||||||
return html2canvas(this.$refs.report, {
|
return html2canvas(this.$refs.report, {
|
||||||
@@ -150,26 +158,33 @@
|
|||||||
|
|
||||||
addPhoto () {
|
addPhoto () {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 9,
|
||||||
sizeType: ['compressed'],
|
sizeType: ['compressed'],
|
||||||
success: res => {
|
success: res => {
|
||||||
this.$loading()
|
res.tempFiles.forEach(v => {
|
||||||
let formData = new FormData()
|
this.upload(v)
|
||||||
formData.append('file', res.tempFiles[0])
|
|
||||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.richList.push({
|
|
||||||
type: 'img',
|
|
||||||
value: res.data.url
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$u.toast(res.msg)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
upload (img) {
|
||||||
|
let formData = new FormData()
|
||||||
|
formData.append('file', img)
|
||||||
|
|
||||||
|
this.$loading()
|
||||||
|
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.richList.push({
|
||||||
|
type: 'img',
|
||||||
|
value: res.data.url
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
confirm () {
|
confirm () {
|
||||||
if (!this.content) {
|
if (!this.content) {
|
||||||
return this.$u.toast('文本不能为空')
|
return this.$u.toast('文本不能为空')
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import html2canvas from 'html2canvas'
|
import html2canvas from 'html2canvas'
|
||||||
import RenderContent from './RenderContent.vue'
|
import RenderContent from './RenderContent.vue'
|
||||||
|
import { mapFieldLable } from './../../config'
|
||||||
export default {
|
export default {
|
||||||
name: 'MeetingMminutes',
|
name: 'MeetingMminutes',
|
||||||
|
|
||||||
@@ -149,6 +150,13 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
screenshot () {
|
screenshot () {
|
||||||
|
for (let i = 0; i < this.configList.length; i ++) {
|
||||||
|
if (['2', '3', '4', '5'].indexOf(this.configList[i].fieldType) === -1 && this.configList[i].fieldType && !this.configList[i].defaultValue && this.configList[i].status === '1') {
|
||||||
|
this.$u.toast(`请输入${mapFieldLable(this.config[i].type)}`)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const height = this.$refs.report.offsetHeight - this.$refs.add.offsetHeight
|
const height = this.$refs.report.offsetHeight - this.$refs.add.offsetHeight
|
||||||
|
|
||||||
return html2canvas(this.$refs.report, {
|
return html2canvas(this.$refs.report, {
|
||||||
@@ -171,26 +179,33 @@
|
|||||||
|
|
||||||
addPhoto () {
|
addPhoto () {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 9,
|
||||||
sizeType: ['compressed'],
|
sizeType: ['compressed'],
|
||||||
success: res => {
|
success: res => {
|
||||||
this.$loading()
|
res.tempFiles.forEach(v => {
|
||||||
let formData = new FormData()
|
this.upload(v)
|
||||||
formData.append('file', res.tempFiles[0])
|
|
||||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.richList.push({
|
|
||||||
type: 'img',
|
|
||||||
value: res.data.url
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$u.toast(res.msg)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
upload (img) {
|
||||||
|
let formData = new FormData()
|
||||||
|
formData.append('file', img)
|
||||||
|
|
||||||
|
this.$loading()
|
||||||
|
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.richList.push({
|
||||||
|
type: 'img',
|
||||||
|
value: res.data.url
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
confirm () {
|
confirm () {
|
||||||
if (!this.content) {
|
if (!this.content) {
|
||||||
return this.$u.toast('文本不能为空')
|
return this.$u.toast('文本不能为空')
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import html2canvas from 'html2canvas'
|
import html2canvas from 'html2canvas'
|
||||||
import RenderContent from './RenderContent.vue'
|
import RenderContent from './RenderContent.vue'
|
||||||
|
import { mapFieldLable } from './../../config'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'WorkReport',
|
name: 'WorkReport',
|
||||||
@@ -119,8 +120,14 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
screenshot () {
|
screenshot () {
|
||||||
const height = this.$refs.report.offsetHeight - this.$refs.add.offsetHeight
|
for (let i = 0; i < this.configList.length; i ++) {
|
||||||
|
if (['2', '3', '4', '5'].indexOf(this.configList[i].fieldType) === -1 && this.configList[i].fieldType && !this.configList[i].defaultValue && this.configList[i].status === '1') {
|
||||||
|
this.$u.toast(`请输入${mapFieldLable(this.config[i].type)}`)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const height = this.$refs.report.offsetHeight - this.$refs.add.offsetHeight
|
||||||
return html2canvas(this.$refs.report, {
|
return html2canvas(this.$refs.report, {
|
||||||
allowTaint: true,
|
allowTaint: true,
|
||||||
useCORS: true,
|
useCORS: true,
|
||||||
@@ -141,27 +148,33 @@
|
|||||||
|
|
||||||
addPhoto () {
|
addPhoto () {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 9,
|
||||||
sizeType: ['compressed'],
|
sizeType: ['compressed'],
|
||||||
success: res => {
|
success: res => {
|
||||||
this.$loading()
|
res.tempFiles.forEach(v => {
|
||||||
let formData = new FormData()
|
this.upload(v)
|
||||||
formData.append('file', res.tempFiles[0])
|
|
||||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
|
||||||
console.log(res)
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.richList.push({
|
|
||||||
type: 'img',
|
|
||||||
value: res.data.url
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$u.toast(res.msg)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
upload (img) {
|
||||||
|
let formData = new FormData()
|
||||||
|
formData.append('file', img)
|
||||||
|
|
||||||
|
this.$loading()
|
||||||
|
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.richList.push({
|
||||||
|
type: 'img',
|
||||||
|
value: res.data.url
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
confirm () {
|
confirm () {
|
||||||
if (!this.content) {
|
if (!this.content) {
|
||||||
return this.$u.toast('文本不能为空')
|
return this.$u.toast('文本不能为空')
|
||||||
|
|||||||
BIN
src/saas/AppCountryAlbum/images/edit.png
Normal file
BIN
src/saas/AppCountryAlbum/images/edit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 119 B |
BIN
src/saas/AppCountryAlbum/images/setting.png
Normal file
BIN
src/saas/AppCountryAlbum/images/setting.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 428 B |
Reference in New Issue
Block a user