Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_cp/dv_cp_wechat_app into dev
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
<div @click="back">
|
||||
<span>取消</span>
|
||||
</div>
|
||||
<div @click="confirm">{{ type === 'edit' ? '发布' : '确定' }}</div>
|
||||
<div @click="confirm">{{ isEdit ? '发布' : '确定' }}</div>
|
||||
</div>
|
||||
<u-modal v-model="isShowModal" :content="tips"></u-modal>
|
||||
<u-picker mode="time" v-model="isShowTime" :show-time-tag="true" @close="isShowTime = false" @confirm="onTimeChange"
|
||||
@@ -78,10 +78,16 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['id', 'formConfig', 'type'],
|
||||
|
||||
props: ['formConfig'],
|
||||
computed: {
|
||||
isEdit() {
|
||||
return this.$route.query.type == 'edit'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
let {id} = this.$route.query
|
||||
return {
|
||||
id,
|
||||
params: {
|
||||
year: true,
|
||||
month: true,
|
||||
@@ -101,8 +107,7 @@ export default {
|
||||
periodValidityType: '0'
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
created() {
|
||||
if (this.id) {
|
||||
this.getInfo(this.id)
|
||||
} else if (this.formConfig) {
|
||||
@@ -111,25 +116,23 @@ export default {
|
||||
this.commitType = res.commitType || '1'
|
||||
this.actionNotice = res.actionNotice === '1'
|
||||
this.dynamicNotice = res.dynamicNotice === '1'
|
||||
|
||||
if (res.periodValidityType === '1') {
|
||||
this.periodValidityEndTime = res.periodValidityEndTime
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onTimeChange(e) {
|
||||
this.periodValidityEndTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$emit('back')
|
||||
uni.navigateBack({})
|
||||
},
|
||||
|
||||
getInfo(id) {
|
||||
this.$http.post(`/app/appquestionnairetemplate/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res?.data) {
|
||||
this.periodValidityType = res.data.periodValidityType
|
||||
this.commitType = res.data.commitType
|
||||
this.actionNotice = res.data.actionNotice === '1'
|
||||
@@ -158,9 +161,7 @@ export default {
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
uni.$emit('reload')
|
||||
this.$u.toast('发布成功')
|
||||
|
||||
this.back()
|
||||
}
|
||||
}).catch(e => {
|
||||
@@ -169,12 +170,10 @@ export default {
|
||||
},
|
||||
|
||||
confirm() {
|
||||
if (this.type === 'edit') {
|
||||
if (this.isEdit) {
|
||||
this.publish()
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
uni.$emit('setting', {
|
||||
periodValidityType: this.periodValidityType,
|
||||
commitType: this.commitType,
|
||||
@@ -182,7 +181,6 @@ export default {
|
||||
dynamicNotice: this.dynamicNotice ? '1' : '0',
|
||||
periodValidityEndTime: this.periodValidityEndTime ? this.periodValidityEndTime : ''
|
||||
})
|
||||
|
||||
this.back()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,13 +124,13 @@ export default {
|
||||
},
|
||||
|
||||
showPopup(item) {
|
||||
if (item.status === '2') {
|
||||
this.$confirm('表单已停止发布,请在后台管理系统中查看调查结果', '', {
|
||||
showCancel: false
|
||||
})
|
||||
|
||||
return false
|
||||
}
|
||||
// if (item.status === '2') {
|
||||
// this.$confirm('表单已停止发布,请在后台管理系统中查看调查结果', '', {
|
||||
// showCancel: false
|
||||
// })
|
||||
//
|
||||
// return false
|
||||
// }
|
||||
|
||||
this.info = item
|
||||
this.id = item.id
|
||||
@@ -205,11 +205,9 @@ export default {
|
||||
if (this.info.status === '1') {
|
||||
return this.$u.toast('该表单已发布')
|
||||
}
|
||||
|
||||
this.linkTo(`./formSetting?id=${this.info.id}&type=edit`)
|
||||
this.linkTo(`./FormSetting?id=${this.info.id}&type=edit`)
|
||||
this.isShow = false
|
||||
},
|
||||
|
||||
toEdit() {
|
||||
if (this.info.dataCount !== 0) {
|
||||
return this.$u.toast('该表单已有数据,无法编辑!')
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
<template>
|
||||
<div class="Add">Add</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Add',
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
onLoad: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
onShow() {},
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.Add {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,228 +0,0 @@
|
||||
<template>
|
||||
<div class="AppGoodDeeds">
|
||||
<template v-if="datas.length > 0">
|
||||
<AiCard v-for="(item, i) in datas" :key="i" @click.native="toAdd(item, 1)">
|
||||
<template #custom>
|
||||
<div class="titles">{{ item.createUserName }}</div>
|
||||
|
||||
<div class="contents">生活中有多少点点滴滴?人生的每一天会有几滴?生活中有那么多点点滴滴,你会记得多少?最难忘的事情是什么?我记得有一…生活中有多少点点滴滴?人生的每一天会有几滴?生活中有那么多点点滴滴,你会记得多少?最难忘的事情是什么?我记得有</div>
|
||||
|
||||
<div class="imgs">
|
||||
<img src="./yan.jpg" alt="" v-for="(items, i) in 4" :key="i" />
|
||||
<!-- <img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" @click.stop="previewImage(item.images, items.url)" /> -->
|
||||
</div>
|
||||
|
||||
<div class="imgBottom">
|
||||
<div>2021_12_17_13_23</div>
|
||||
<div class="right">
|
||||
<div class="right-left">
|
||||
<u-icon name="eye"></u-icon>
|
||||
<span class="hint">24</span>
|
||||
</div>
|
||||
|
||||
<div class="right-right" @click.stop="toChange">
|
||||
<u-icon name="thumb-up" color="red"></u-icon>
|
||||
<span class="hint">4</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #menu>
|
||||
<div class="menu" @tap.stop="toAdd(item, 2)">编辑</div>
|
||||
<div class="menu" @tap.stop="toDetele(item)">删除</div>
|
||||
</template>
|
||||
</AiCard>
|
||||
|
||||
<u-loadmore :status="loadmore" color="#999" font-size="24" margin-top="32" margin-bottom="80" />
|
||||
</template>
|
||||
|
||||
<AiEmpty description="暂无数据" v-else></AiEmpty>
|
||||
|
||||
<AiFixedBtn :y="740">
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()" />
|
||||
</AiFixedBtn>
|
||||
|
||||
<u-modal v-model="deletShow" content="您确认要结束议题公示?" :show-cancel-button="true" :mask-close-able="true" :show-title="false" @confirm="delet"></u-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AppGoodDeeds',
|
||||
appName: '好人好事',
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
datas: [],
|
||||
currentTabs: 0,
|
||||
current: 1,
|
||||
current: 1,
|
||||
size: 10,
|
||||
pages: 0,
|
||||
deletShow: false,
|
||||
deletId: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
loadmore() {
|
||||
return this.pages <= this.current ? 'loading ' : 'nomore'
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$http
|
||||
.post('/app/appvisitvondolence/list', null, {
|
||||
params: {
|
||||
size: 6,
|
||||
current: this.current,
|
||||
areaId: this.areaId,
|
||||
title: this.keyword,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
|
||||
this.pages = res.data.pages
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toAdd(item, type) {
|
||||
if (type == '1') {
|
||||
console.log('详情')
|
||||
uni.navigateTo({ url: `./Detail?id=${item.id}` })
|
||||
}
|
||||
if (type == '2') {
|
||||
console.log('编辑')
|
||||
uni.navigateTo({ url: `./Add?id=${item.id}` })
|
||||
}
|
||||
if (type == null) {
|
||||
console.log('添加')
|
||||
uni.navigateTo({ url: `./Add` })
|
||||
}
|
||||
},
|
||||
|
||||
toDetele(item) {
|
||||
this.deletShow = true
|
||||
this.deletId = item.id
|
||||
},
|
||||
|
||||
delet() {
|
||||
this.$http.post(`/app/appvisitvondolence/delete?ids=${this.deletId}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toChange() {
|
||||
console.log('点赞')
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current = this.current + 1
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
uni-page-body {
|
||||
height: 100%;
|
||||
}
|
||||
.AppGoodDeeds {
|
||||
height: 100%;
|
||||
|
||||
::v-deep .AiCard {
|
||||
background: #f3f6f9;
|
||||
.start {
|
||||
background: #fff;
|
||||
padding: 32px;
|
||||
border-radius: 16px;
|
||||
.titles {
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.contents {
|
||||
line-height: 1.4;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.imgs {
|
||||
margin-top: 24px;
|
||||
img {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
img:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
.imgBottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 24px;
|
||||
.right {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.right-right,
|
||||
.right-left {
|
||||
margin-left: 48px;
|
||||
.hint {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.mask {
|
||||
.moreMenu {
|
||||
transform: translate(-175px, 30px);
|
||||
.menu {
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
width: 192px;
|
||||
height: 80px;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.AiFixedBtn {
|
||||
.movableArea {
|
||||
.addBtn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
flex-shrink: 0;
|
||||
background: $uni-color-primary;
|
||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
|
||||
font-size: 60px;
|
||||
color: #1365dd;
|
||||
background: #fff;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,98 +0,0 @@
|
||||
<template>
|
||||
<div class="Detail">
|
||||
<div class="header-top">
|
||||
<div class="titles">闲置电脑转让,有意请联系,非诚闲置电脑转让,有意请联系,非诚勿扰,需要闲置电脑转让,有意请联系,非诚勿扰,需要勿扰,需要</div>
|
||||
|
||||
<div class="imgBottom">
|
||||
<div>2021_12_17_13_23</div>
|
||||
<div class="right">
|
||||
<div class="right-left">
|
||||
<u-icon name="eye"></u-icon>
|
||||
<span class="hint">24</span>
|
||||
</div>
|
||||
|
||||
<div class="right-right" @click.stop="toChange">
|
||||
<u-icon name="thumb-up" color="red"></u-icon>
|
||||
<span class="hint">4</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header-middle">
|
||||
<div class="contents">戴尔高配超薄本,超薄系列,超窄边框14.1寸全屏高戴尔高配超薄本,超薄系列,超窄边框14.1寸全屏高戴尔高配超薄本,超薄系列,超窄边框14.1寸全屏高戴尔高配超薄本,超薄系列,超窄配超薄本,超薄系列,超窄边框14.1寸全屏高戴尔高配超薄本,超薄系列,超窄边框14.1寸全屏高戴尔高配超薄本,超薄系列,超窄边框14.1寸全屏高戴尔高配超薄本,超薄系列,超窄配超薄本,超薄系列,超窄边框14.1寸全屏高戴尔高配超薄本,超薄系列,超窄边框14.1寸全屏高戴尔高配超薄本,超薄系列,超窄边框14.1寸全屏高戴尔高配超薄本,超薄系列,超窄边框14.1寸全屏高</div>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<div>图片</div>
|
||||
|
||||
<img src="./yan.jpg" alt="" v-for="(item, i) in 7" :key="i" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Detail',
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
onLoad() {},
|
||||
onShow() {},
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
uni-page-body {
|
||||
height: 100%;
|
||||
}
|
||||
.Detail {
|
||||
height: 100%;
|
||||
padding: 0 32px;
|
||||
background: #fff;
|
||||
.header-top {
|
||||
padding: 40px 0 32px 0;
|
||||
.titles {
|
||||
font-size: 48px;
|
||||
font-weight: 600;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.imgBottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 24px;
|
||||
font-size: 30px;
|
||||
color: #999999;
|
||||
.right {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.right-right,
|
||||
.right-left {
|
||||
margin-left: 48px;
|
||||
.hint {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.header-middle {
|
||||
.contents {
|
||||
padding: 32px 0 48px 0;
|
||||
line-height: 1.5;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 88 KiB |
Reference in New Issue
Block a user