This commit is contained in:
花有清香月有阴
2022-01-07 17:55:15 +08:00
4 changed files with 45 additions and 22 deletions

View File

@@ -115,7 +115,7 @@ export default {
} }
}) })
}else { //查网格员 }else { //查网格员
this.$http.post(`/app/appgirdmemberinfo/listByGirdId`, {girdId: row.id}).then((res) => { this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${row.id}`).then((res) => {
if (res?.data) { if (res?.data) {
this.userList = res.data this.userList = res.data
this.userList.map((item) => { this.userList.map((item) => {

View File

@@ -42,10 +42,10 @@
<div class="items" v-for="(item, index) in list" :key="index"> <div class="items" v-for="(item, index) in list" :key="index">
<img src="./img/22.png" alt="" @click="del(index)" /> <img src="./img/22.png" alt="" @click="del(index)" />
<div class="rightopts"> <div class="rightopts">
<u-input v-model="item.content" placeholder="选项" maxlength="200" :clearable="false" /> <u-input :height="40" type="textarea" v-model="item.content" placeholder="选项" maxlength="200" :clearable="false" />
</div> </div>
</div> </div>
<div class="items" @click="addOpts"> <div class="items" style="padding-top: 20px" @click="addOpts">
<img src="./img/11.png" alt="" /> <img src="./img/11.png" alt="" />
<div class="addopts">添加选项</div> <div class="addopts">添加选项</div>
@@ -144,7 +144,6 @@ export default {
if (!this.form.discussDeadline) { if (!this.form.discussDeadline) {
return this.$u.toast('请选择议事截止时间') return this.$u.toast('请选择议事截止时间')
} }
if (this.form.type === '1') { if (this.form.type === '1') {
if (!this.list.length) { if (!this.list.length) {
return this.$u.toast('请添加选项') return this.$u.toast('请添加选项')
@@ -156,13 +155,13 @@ export default {
list = this.list.map((v, index) => { list = this.list.map((v, index) => {
return { return {
content: v.content, content: v.content,
item: this.keys[index], item: this.keys[index]
} }
}) })
for (let i = 0; i < list.length; i ++) { for (let i = 0; i < list.length; i ++) {
if (!list[i].content) { if (!list[i].content) {
return this.$u.toast(`请输入${i + 1}个选项的内容`) return this.$u.toast(`请输入${i + 1}个选项的内容`)
} }
} }
} }
@@ -184,7 +183,7 @@ export default {
if (res.code == 0) { if (res.code == 0) {
uni.$emit('update') uni.$emit('update')
this.$u.toast('发布成功') this.$u.toast('发布成功')
this.flag = publish this.flag = true
setTimeout(() => { setTimeout(() => {
uni.navigateBack({}) uni.navigateBack({})
}, 600) }, 600)
@@ -197,7 +196,7 @@ export default {
// return this.$u.toast('请输入选项内容') // return this.$u.toast('请输入选项内容')
// } // }
this.list.push({ this.list.push({
content: '', content: ''
}) })
}, },
@@ -206,7 +205,6 @@ export default {
}, },
areaSelect(e) { areaSelect(e) {
console.log(e)
this.form.areaId = e this.form.areaId = e
}, },
@@ -316,11 +314,16 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0 40px 0 32px !important; padding: 20px 40px 0 !important;
width: 100%; width: 100%;
height: 120px; // height: 120px;
line-height: 120px; // line-height: 120px;
box-sizing: border-box; box-sizing: border-box;
::v-deep .u-input__textarea {
padding-bottom: 20px;
}
img { img {
width: 36px; width: 36px;
height: 36px; height: 36px;

View File

@@ -23,9 +23,7 @@
</div> </div>
<div class="statusTag" :class="{ over: item.status > 0 }" v-text="item.status == 0 ? (item.type == 0 ? '征集中' : '投票中') : $dict.getLabel('discussStatus', item.status)" /> <div class="statusTag" :class="{ over: item.status > 0 }" v-text="item.status == 0 ? (item.type == 0 ? '征集中' : '投票中') : $dict.getLabel('discussStatus', item.status)" />
</div> </div>
<p class="item-content"> <p class="item-content">{{ item.content }}</p>
<u-parse :html="item.content"></u-parse>
</p>
<div v-if="item.images && item.images.length"> <div v-if="item.images && item.images.length">
<div class="img-list" v-if="item.contentType != 1"> <div class="img-list" v-if="item.contentType != 1">
<img :src="items.url" alt="" v-for="(items, index) in item.images" :key="index" v-if="index < 3" @click.stop="previewImage(item.images, items.url)" /> <img :src="items.url" alt="" v-for="(items, index) in item.images" :key="index" v-if="index < 3" @click.stop="previewImage(item.images, items.url)" />

View File

@@ -57,7 +57,10 @@
</span> </span>
<div class="comments-vote"> <div class="comments-vote">
<div class="vote-item" v-for="(item, index) in data.voteList" :key="index"> <div class="vote-item" v-for="(item, index) in data.voteList" :key="index">
<div class="left">
<span>{{ item.item }}</span>
<span>{{ item.content }}</span> <span>{{ item.content }}</span>
</div>
<i>{{ item.count }}</i> <i>{{ item.count }}</i>
<em :style="{ width: item.percentage }"></em> <em :style="{ width: item.percentage }"></em>
</div> </div>
@@ -164,7 +167,7 @@ export default {
this.timestamp = discussTime - nowTime this.timestamp = discussTime - nowTime
} }
if (res.data.type === '1') { if (res.data.type === '1' && res.data.statistic) {
const total = Object.values(res.data.statistic).reduce((x, y) => { const total = Object.values(res.data.statistic).reduce((x, y) => {
return x + y return x + y
}) })
@@ -176,11 +179,12 @@ export default {
} }
}) })
} }
this.pageShow = true
this.$hideLoading() this.$hideLoading()
this.pageShow = true
} else { } else {
this.$hideLoading() this.$hideLoading()
this.pageShow = true
} }
}) })
.catch(() => { .catch(() => {
@@ -437,15 +441,32 @@ export default {
position: relative; position: relative;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
height: 64px; padding: 24px 32px;
line-height: 64px;
margin-bottom: 16px; margin-bottom: 16px;
padding: 0 32px;
background: #ffffff; background: #ffffff;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
border: 1px solid #95cbff; border: 1px solid #95cbff;
.left {
display: flex;
flex: 1;
line-height: 1.2;
margin-right: 20px;
span {
word-break: break-word;
&:first-child {
flex-shrink: 1;
}
&:last-child {
flex: 1;
}
}
}
em { em {
position: absolute; position: absolute;
left: 0; left: 0;
@@ -456,6 +477,7 @@ export default {
} }
span { span {
flex-shrink: 1;
position: relative; position: relative;
z-index: 1; z-index: 1;
color: #5b84b3; color: #5b84b3;