Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wanglei
2021-12-03 15:21:26 +08:00
5 changed files with 386 additions and 207 deletions

View File

@@ -11,6 +11,7 @@
<script>
import Tabbar from './components/Tabbar.vue'
import AddForm from './components/AddForm.vue'
import Result from './components/Result.vue'
export default {
name: 'AppAskForm',
@@ -25,6 +26,7 @@
components: {
Tabbar,
Result,
AddForm
},

View File

@@ -117,16 +117,16 @@
</div>
<div class="detail" v-if="isShowConfig">
<component
:is="component"
:index="filedIndex"
:filed="filed"
@change="onChange"
:targetListData="targetList"
:formData="form"
:filedType="filedType"
@back="isShowConfig = false"
:id="id"
:formConfig="formConfig">
:is="component"
:index="filedIndex"
:filed="filed"
@change="onChange"
:targetListData="targetList"
:formData="form"
:filedType="filedType"
@back="isShowConfig = false"
:id="id"
:formConfig="formConfig">
</component>
</div>
</div>
@@ -328,6 +328,7 @@ export default {
}
})
this.$loading()
this.$http.post(`/app/appquestionnairetemplate/addOrUpdate`, {
...this.form,
fields,
@@ -338,11 +339,15 @@ export default {
templateType: 0
}).then(res => {
if (res.code == 0) {
this.$u.toast('提交成功')
setTimeout(() => {
this.$emit('change', {
type: 'Tabbar'
type: 'Result',
params: {
linkUrl: res.data.linkUrl,
tableExplain: this.form.title,
tableExplain: this.form.tableExplain,
headPicture: this.form.headPicture
}
})
}, 600)
}

View File

@@ -0,0 +1,159 @@
<template>
<div class="result">
<image class="result-success" :src="`${$cdn}form/result-success.png`"/>
<h2>创建成功</h2>
<p>表单创建成功您现在可以把表单分享给更多的好友来填写数据</p>
<div class="result-btn" @click="confirm">确定</div>
<div class="result-footer">
<div class="result-footer__item" @click="copy">
<div>
<image :src="`${$cdn}form/form-copylink.png`"/>
</div>
<h3>复制链接</h3>
</div>
<div class="result-footer__item" @click="shareWechat">
<div>
<image :src="`${$cdn}form/form-wechat.png`"/>
</div>
<h3>微信好友</h3>
</div>
<div class="result-footer__item" @click="share">
<div>
<image :src="`${$cdn}form/form-share.png`"/>
</div>
<h3>分享</h3>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Result',
props: ['params'],
mounted () {
this.injectJWeixin(['sendChatMessage', 'selectEnterpriseContact'])
console.log(this.params)
},
methods: {
copy() {
let oInput = document.createElement('input')
oInput.value = this.params.linkUrl
document.body.appendChild(oInput)
oInput.select()
document.execCommand('Copy')
this.$u.toast('已复制')
oInput.remove()
},
share () {
this.injectJWeixin(['shareAppMessage', 'shareWechatMessage']).then(() => {
this.wxInvoke(['shareAppMessage', {
title: this.params.title,
desc: this.params.tableExplain,
link: res.params.linkUrl,
imgUrl: this.params.headPicture
}])
})
},
shareWechat () {
this.injectJWeixin(['shareAppMessage', 'shareWechatMessage']).then(() => {
this.wxInvoke(['shareWechatMessage', {
title: this.params.title,
desc: this.params.tableExplain,
link: res.params.linkUrl,
imgUrl: this.params.headPicture
}])
})
},
confirm () {
this.$emit('change', {
type: 'Tabbar'
})
}
}
}
</script>
<style lang="scss" scoped>
.result {
min-height: 100vh;
padding: 0 96px;
text-align: center;
background: #fff;
.result-footer {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 96px;
.result-footer__item {
flex: 1;
text-align: center;
div {
display: flex;
align-items: center;
justify-content: center;
width: 100px;
height: 100px;
margin: 0 auto 16px;
border-radius: 50%;
background: #F4F6FA;
image {
width: 100px;
height: 100px;
}
}
h3 {
color: #666666;
font-size: 24px;
font-weight: normal;
}
}
}
.result-success {
display: block;
width: 192px;
height: 192px;
margin: 96px auto 16px;
}
p {
margin: 16px 0 32px;
color: #999999;
font-size: 30px;
}
.result-btn {
width: 100%;
height: 88px;
line-height: 88px;
text-align: center;
font-size: 36px;
color: #fff;
background: #197DF0;
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.02);
border-radius: 4px;
&:active {
opacity: 0.8;
}
}
h2 {
color: #333333;
font-size: 36px;
font-weight: 700;
}
}
</style>

View File

@@ -6,7 +6,7 @@
<u-grid-item v-for="(item,index) in grid" :key="index" :custom-style="{padding:'14px 0'}"
@click="handleClick(index)">
<u-icon :name="item.icon" :size="64"></u-icon>
<view class="label">{{item.label}}</view>
<view class="label">{{ item.label }}</view>
</u-grid-item>
</u-grid>
</ai-top-fixed>
@@ -14,26 +14,30 @@
<header>待参加的会议</header>
<template v-if="meetingList.length">
<div class="card" v-for="(item,index) in meetingList" :key="index" @click="detail(item)">
<header>{{item.title}}</header>
<header>{{ item.title }}</header>
<u-row justify="between">
<div class="time">
<span>{{item.startTime|format}}</span>
<span>{{item.startTime|formatDate(0)}}{{item.startTime|formatDate(1)}}{{item.startTime|formatDate(2)}} {{item.startTime|formatWeek}}</span>
<span>{{ item.startTime|format }}</span>
<span>{{ item.startTime|formatDate(0) }}{{
item.startTime|formatDate(1)
}}{{ item.startTime|formatDate(2) }} {{ item.startTime|formatWeek }}</span>
</div>
<div class="arrow"></div>
<div class="time">
<span>{{item.endTime|format}}</span>
<span>{{item.endTime|formatDate(0)}}{{item.endTime|formatDate(1)}}{{item.endTime|formatDate(2)}} {{item.endTime|formatWeek}}</span>
<span>{{ item.endTime|format }}</span>
<span>{{ item.endTime|formatDate(0) }}{{ item.endTime|formatDate(1) }}{{
item.endTime|formatDate(2)
}} {{ item.endTime|formatWeek }}</span>
</div>
</u-row>
<u-row class="info">
<span>发起人员</span>
<span>{{item.userName}}</span>
<ai-open-data type="userName" :openid="item.createUserId"/>
</u-row>
<u-gap height="20"></u-gap>
<u-row class="info">
<span>会议地点</span>
<span>{{item.address}}</span>
<span>{{ item.address }}</span>
</u-row>
<div class="tag" :style="{background:'url(' + $cdn + tag(item.joinStatus) + ')'}"></div>
</div>
@@ -50,224 +54,225 @@
</template>
<script>
import AiEmpty from "../../components/AiEmpty";
import AiTopFixed from "../../components/AiTopFixed";
import AiAdd from "../../components/AiAdd";
import {addMeeting, belongToMe, detail, meetingList} from './components'
import AiEmpty from "../../components/AiEmpty";
import AiTopFixed from "../../components/AiTopFixed";
import AiAdd from "../../components/AiAdd";
import {addMeeting, belongToMe, detail, meetingList} from './components'
import AiOpenData from "../../components/AiOpenData";
export default {
name: "AppMeetingNotice",
appName: "会议通知",
components: {AiEmpty, AiTopFixed, AiAdd, addMeeting, belongToMe, detail, meetingList},
data() {
return {
meetingList: [],
isList: true,
comp: "",
params: null,
}
},
created() {
this.$dict.load("meetingNoticeBefore", "meetingNoticeAfter", "meetStatus");
},
computed: {
grid() {
return [
{
icon: this.$cdn + "/common/iconlshy.png",
label: "历史会议"
},
{
icon: this.$cdn + "/common/iconwfqd.png",
label: "我发起的"
},
{
icon: this.$cdn + "/common/iconcgx.png",
label: "草稿箱"
}
]
}
},
methods: {
emitShow(){
const {id} = this.$route.query
if(id){
this.comp = "detail";
this.params = id;
this.isList = false;
export default {
name: "AppMeetingNotice",
appName: "会议通知",
components: {AiOpenData, AiEmpty, AiTopFixed, AiAdd, addMeeting, belongToMe, detail, meetingList},
data() {
return {
meetingList: [],
isList: true,
comp: "",
params: null,
}
},
created() {
this.$dict.load("meetingNoticeBefore", "meetingNoticeAfter", "meetStatus");
},
computed: {
grid() {
return [
{
icon: this.$cdn + "/common/iconlshy.png",
label: "历史会议"
},
{
icon: this.$cdn + "/common/iconwfqd.png",
label: "我发起的"
},
{
icon: this.$cdn + "/common/iconcgx.png",
label: "草稿箱"
}
this.getData()
},
tag(status) {
return {
"0": "common/1wqr.png",
"1": "common/1yqr.png",
"2": "common/1yqj.png",
"3": "common/toDo.png",
}[status]
},
detail({id}) {
]
}
},
methods: {
emitShow() {
const {id} = this.$route.query
if (id) {
this.comp = "detail";
this.params = id;
this.isList = false;
},
getData() {
this.$http.post("/app/appmeetinginfo/list", null, {
params: {
listType: "1",
meetingStatus: "1|2",
size: 999
}
}).then(res => {
if (res && res.data) {
this.meetingList = res.data.records
}
})
},
handleClick(index) {
this.params = index;
this.isList = false;
if (index == 0 || index == 2) {
this.comp = "meetingList";
} else if (index == 1) {
this.comp = "belongToMe";
}
this.getData()
},
tag(status) {
return {
"0": "common/1wqr.png",
"1": "common/1yqr.png",
"2": "common/1yqj.png",
"3": "common/toDo.png",
}[status]
},
detail({id}) {
this.comp = "detail";
this.params = id;
this.isList = false;
},
getData() {
this.$http.post("/app/appmeetinginfo/list", null, {
params: {
listType: "1",
meetingStatus: "1|2",
size: 999
}
},
add() {
this.isList = false;
this.comp = "addMeeting";
}).then(res => {
if (res && res.data) {
this.meetingList = res.data.records
}
})
},
handleClick(index) {
this.params = index;
this.isList = false;
if (index == 0 || index == 2) {
this.comp = "meetingList";
} else if (index == 1) {
this.comp = "belongToMe";
}
},
add() {
this.isList = false;
this.comp = "addMeeting";
}
},
filters: {
format(date) {
return date.split(" ")[1].substr(0, 5)
},
formatDate(date, index) {
return date.split(" ")[0].split("-")[index]
},
formatWeek(date) {
return "日一二三四五六".charAt((new Date(date.split(" ")[0]).getDay()))
}
filters: {
format(date) {
return date.split(" ")[1].substr(0, 5)
},
formatDate(date, index) {
return date.split(" ")[0].split("-")[index]
},
formatWeek(date) {
return "日一二三四五六".charAt((new Date(date.split(" ")[0]).getDay()))
}
},
}
}
</script>
<style lang="scss" scoped>
.meeting {
min-height: 100%;
background: #F5F5F5;
padding-bottom: 48px;
.meeting {
min-height: 100%;
background: #F5F5F5;
padding-bottom: 48px;
.label {
font-size: 28px;
font-weight: 400;
.label {
font-size: 28px;
font-weight: 400;
color: #333333;
line-height: 48px;
margin-top: 8px;
}
.body {
box-sizing: border-box;
padding: 40px 32px;
& > header {
font-size: 36px;
font-weight: 600;
color: #333333;
line-height: 48px;
margin-top: 8px;
margin-bottom: 38px;
}
.body {
.card {
background-color: #FFFFFF;
box-sizing: border-box;
padding: 40px 32px;
padding: 32px;
border-radius: 8px;
margin-bottom: 32px;
position: relative;
&:last-child {
margin-bottom: 0;
}
& > header {
font-size: 36px;
font-size: 32px;
font-weight: 600;
color: #333333;
margin-bottom: 38px;
}
.card {
background-color: #FFFFFF;
box-sizing: border-box;
padding: 32px;
border-radius: 8px;
margin-bottom: 32px;
position: relative;
.time {
display: flex;
flex-direction: column;
margin: 46px 0;
&:last-child {
margin-bottom: 0;
}
& > header {
font-size: 32px;
& > span:first-child {
font-size: 60px;
font-weight: 600;
color: #333333;
line-height: 84px;
}
.time {
display: flex;
flex-direction: column;
margin: 46px 0;
& > span:first-child {
font-size: 60px;
font-weight: 600;
color: #333333;
line-height: 84px;
}
& > span:last-child {
font-size: 22px;
color: #333333;
}
}
.arrow {
width: 28px;
height: 68px;
overflow: hidden;
position: relative;
transform: rotate(180deg);
&:before, &:after {
content: "";
width: 50px;
height: 50px;
position: absolute;
transform: scaleY(1.3) translate(30%, -40px) rotate(45deg);
}
&:before {
top: 59px;
background-color: #CCCCCC;
}
&:after {
left: 7px;
top: 59px;
background-color: #FFFFFF;
}
}
.info {
& > span:first-child {
font-size: 30px;
color: #999999;
}
& > span:last-child {
font-size: 30px;
color: #343D65;
}
}
.tag {
width: 112px;
height: 112px;
background-repeat: no-repeat !important;
background-size: 100% 100% !important;
position: absolute;
top: 0;
right: 0;
& > span:last-child {
font-size: 22px;
color: #333333;
}
}
}
::v-deep .content {
padding: 0 !important;
.arrow {
width: 28px;
height: 68px;
overflow: hidden;
position: relative;
transform: rotate(180deg);
&:before, &:after {
content: "";
width: 50px;
height: 50px;
position: absolute;
transform: scaleY(1.3) translate(30%, -40px) rotate(45deg);
}
&:before {
top: 59px;
background-color: #CCCCCC;
}
&:after {
left: 7px;
top: 59px;
background-color: #FFFFFF;
}
}
.info {
& > span:first-child {
font-size: 30px;
color: #999999;
}
& > span:last-child {
font-size: 30px;
color: #343D65;
}
}
.tag {
width: 112px;
height: 112px;
background-repeat: no-repeat !important;
background-size: 100% 100% !important;
position: absolute;
top: 0;
right: 0;
}
}
}
::v-deep .content {
padding: 0 !important;
}
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<div :type="type" :openid="openid"/>
<div :type="type" :openid="oid" v-text="oid"/>
</template>
<script>
@@ -8,6 +8,14 @@ import {mapActions} from "vuex";
export default {
name: "AiOpenData",
props: ['type', 'openid'],
computed: {
oid() {
/**
* 后端返回格式(cropId|userId)
*/
return this.openid?.split("|")?.[1] || this.openid || ""
}
},
methods: {
...mapActions(['injectJWeixin'])
},