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

This commit is contained in:
wanglei
2021-12-08 09:25:22 +08:00
12 changed files with 191 additions and 135 deletions

View File

@@ -31,13 +31,6 @@
},
onLoad () {
uni.$on('reload', () => {
if (this.currIndex === 0) {
this.$refs.list.reload()
} else {
this.$refs.addList.getList()
}
})
},
methods: {
@@ -45,12 +38,6 @@
this.params = e.params
this.component = e.type
},
},
onReachBottom() {
if (this.currIndex === 0) {
this.$refs.list.getList()
}
}
}
</script>

View File

@@ -3,7 +3,7 @@
<template v-if="showDetail">
<form-detail/>
</template>
<ai-result v-else :tips="errMsg" status="error"/>
<ai-result v-else :tips="errMsg" :status="errStatus"/>
</section>
</template>
@@ -29,7 +29,11 @@ export default {
return !!this.$route.query?.id && this.access
},
errMsg() {
return this.err || (this.access ? "表单不存在" : "无法获取用户信息")
this.access && (this.err = "表单不存在")
return this.err || "数据读取中..."
},
errStatus() {
return !!this.err ? "error" : "loading"
},
isPreview() {
return !!this.$route.query?.preview
@@ -64,7 +68,7 @@ export default {
},
created() {
this.checkAccess()
document.title = "调查问卷"
document.title = "问卷调查"
}
}
</script>

View File

@@ -213,7 +213,6 @@ export default {
})
uni.$on('filedConfig', res => {
console.log(33)
if (res.index === '-1') {
this.targetList.push(res.config)
} else {
@@ -343,7 +342,7 @@ export default {
type: 'Result',
params: {
linkUrl: res.data.linkUrl,
tableExplain: this.form.title,
title: this.form.title,
tableExplain: this.form.tableExplain,
headPicture: this.form.headPicture
}

View File

@@ -1,5 +1,5 @@
<template>
<div class="form">
<div class="template-wrapper">
<div class="form-list">
<div
class="form-list__item"
@@ -88,101 +88,105 @@ export default {
</script>
<style lang="scss" scoped>
.template {
margin: 32px 32px 0;
background: #fff;
border-radius: 8px;
overflow: hidden;
.template-wrapper {
padding-bottom: 120rpx;
& > h2 {
height: 88px;
line-height: 88px;
padding: 0 24px;
color: #333333;
font-size: 30px;
}
.template-item {
display: flex;
align-items: center;
height: 104px;
padding: 0 24px;
border-bottom: 1px solid #D8DDE6;
&:active {
background-color: #eee;
}
&:last-child {
border: none;
}
image {
width: 36px;
height: 42px;
}
i {
font-size: 30px;
color: #E1E2E3;
}
h2 {
flex: 1;
padding: 0 18px;
color: #333333;
font-size: 28px;
font-weight: normal;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
}
}
.form-list {
display: flex;
flex-wrap: wrap;
padding: 0 32px 0;
div {
box-sizing: border-box;
}
.form-list__item {
width: calc(50% - 13px);
height: 216px;
margin: 32px 24px 0 0;
padding: 40px 20px 52px;
background-color: #FFFFFF;
.template {
margin: 32px 32px 0;
background: #fff;
border-radius: 8px;
background-size: 100% 100%;
overflow: hidden;
&:active {
background-color: #eee;
& > h2 {
height: 88px;
line-height: 88px;
padding: 0 24px;
color: #333333;
font-size: 30px;
}
&:nth-of-type(2n) {
margin-right: 0;
.template-item {
display: flex;
align-items: center;
height: 104px;
padding: 0 24px;
border-bottom: 1px solid #D8DDE6;
&:active {
background-color: #eee;
}
&:last-child {
border: none;
}
image {
width: 36px;
height: 42px;
}
i {
font-size: 30px;
color: #E1E2E3;
}
h2 {
flex: 1;
padding: 0 18px;
color: #333333;
font-size: 28px;
font-weight: normal;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
}
}
.form-list {
display: flex;
flex-wrap: wrap;
padding: 0 32px 0;
div {
width: 148px;
height: 48px;
line-height: 48px;
text-align: center;
color: #fff;
font-size: 28px;
background: #6BA1F9;
border-radius: 24px;
box-sizing: border-box;
}
h2 {
margin-bottom: 32px;
padding-left: 10px;
color: #333333;
font-weight: 700;
font-size: 32px;
.form-list__item {
width: calc(50% - 13px);
height: 216px;
margin: 32px 24px 0 0;
padding: 40px 20px 52px;
background-color: #FFFFFF;
border-radius: 8px;
background-size: 100% 100%;
&:active {
background-color: #eee;
}
&:nth-of-type(2n) {
margin-right: 0;
}
div {
width: 148px;
height: 48px;
line-height: 48px;
text-align: center;
color: #fff;
font-size: 28px;
background: #6BA1F9;
border-radius: 24px;
}
h2 {
margin-bottom: 32px;
padding-left: 10px;
color: #333333;
font-weight: 700;
font-size: 32px;
}
}
}
}

View File

@@ -4,7 +4,7 @@
<u-search placeholder="请输入标题" :show-action="false" search-icon-color="#ccc" v-model="search.title"
@search="isMore = false, search.current = 1, getList()"/>
</ai-top-fixed>
<div class="form-list">
<scroll-view show-scrollbar scroll-y @scrolltolower="getList" class="form-list">
<div class="form-item" v-for="(item, index) in list" :key="index"
@click="showPopup(item)">
<div class="form-item__top">
@@ -27,8 +27,9 @@
<span>{{ $dict.getLabel('questionnaireStatus', item.status) }}</span>
</div>
</div>
<div style="height: 30rpx"></div>
<ai-empty v-if="!list.length && isMore"></ai-empty>
</div>
</scroll-view>
<u-popup v-model="isShow" :closeable="false" mode="bottom" :z-index="11">
<div class="popup">
<h2>{{ info.title }}</h2>
@@ -269,7 +270,6 @@ export default {
getList() {
if (this.isMore) return
this.$http.post(`/app/appquestionnairetemplate/list`, null, {
params: {
...this.search,
@@ -305,6 +305,8 @@ export default {
<style lang="scss" scoped>
.form {
height: 100vh;
overflow: hidden;
::v-deep .u-search {
margin-bottom: 0 !important;
@@ -313,6 +315,12 @@ export default {
}
}
.form-list {
height: calc(100vh - 98rpx - 100rpx);
background: #f5f5f5;
overflow: hidden;
}
.popup {
background: #F7F7F7;

View File

@@ -1,5 +1,5 @@
<template>
<div class="form">
<div class="form-wrapper">
<div class="form-content">
<add-list ref="addList" v-if="currIndex === 1" @change="onChange"></add-list>
<list ref="list" v-if="currIndex === 0" @change="onChange"></list>
@@ -43,16 +43,6 @@ export default {
}
},
onLoad() {
uni.$on('reload', () => {
if (this.currIndex === 0) {
this.$refs.list.reload()
} else {
this.$refs.addList.getList()
}
})
},
methods: {
onChange(e) {
this.$emit('change', e)
@@ -61,14 +51,13 @@ export default {
onReachBottom() {
if (this.currIndex === 0) {
this.$refs.list.getList()
}
}
}
</script>
<style lang="scss" scoped>
.form {
padding-bottom: 98px;
.form-wrapper {
// padding-bottom: 98px;
}
</style>

View File

@@ -95,8 +95,8 @@ import {mapActions} from "vuex";
export default {
name: "addMeeting",
components: {AiBack, AiUploader},
props:{
params:{
props: {
params: {
type: [Number, String]
}
},
@@ -126,9 +126,10 @@ export default {
files: [],
},
userSelect: false,
clickedUserSelect: false
}
},
created(){
created() {
document.title = "新增会议";
if (this.params) {
this.form.id = this.params;
@@ -159,12 +160,15 @@ export default {
methods: {
...mapActions(['selectEnterpriseContact']),
handleSelectUser() {
if (this.clickedUserSelect) return this.$u.toast("正在打开人员选择器")
this.clickedUserSelect = true
this.selectEnterpriseContact({
fromDepartmentId:0,
type:["user"],
selectedUserIds: this.form.attendees?.map(e=>e.id)
fromDepartmentId: 0,
type: ["user"],
selectedUserIds: this.form.attendees?.map(e => e.id)
}).then(res => {
this.change(res?.userList || [])
this.clickedUserSelect = false
})
},
fileList(e) {

View File

@@ -0,0 +1,51 @@
<template>
<div class="AppWalkask">
<u-navbar title="走访慰问" back-icon-color="#fff" title-color="#fff" title-width="300" title-size="36" :background="backgroundNavbar"> </u-navbar>
<div class="header-top">
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
</div>
<div>
<div v-if="current == 0">0</div>
<div v-if="current == 1">1</div>
</div>
</div>
</template>
<script>
export default {
name: 'AppWalkask',
appName: '走访慰问',
computed: {},
components: {},
data() {
return {
backgroundNavbar: {
backgroundColor: '#3975C6',
},
list: [
{
name: '全部',
},
{
name: '我的走访',
},
],
current: 0,
}
},
onLoad() {},
onShow() {},
methods: {
change(index) {
this.current = index
},
},
}
</script>
<style lang="scss" scoped>
.AppWalkask {
}
</style>