随手拍

This commit is contained in:
liuye
2022-01-05 16:53:11 +08:00
parent 7f53435a84
commit 8b2bb717d1
14 changed files with 353 additions and 387 deletions

View File

@@ -26,10 +26,10 @@ export default {
data() {
return {
component: 'Statistics',
component: 'List',
params: {},
refresh: true,
tabIndex: 1,
tabIndex: 0,
tabs: [
{
img: require('./components/img/handle-icon.png'),

View File

@@ -2,8 +2,13 @@
<div class="Transfer">
<div class="contents">
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="事件分类" prop="status" required :border-bottom="false" right-icon="arrow-right">
<u-input v-model="forms.status" placeholder="请选择事件分类" @click="show = true" />
<u-select v-model="show" :list="$dict.getDict('realityStatus')" value-name="dictValue" label-name="dictName" @confirm="selectStatus"></u-select>
</u-form-item>
<u-form-item label="转交给" prop="status" required :border-bottom="false" right-icon="arrow-right" class="first-form">
<u-input v-model="forms.status" placeholder="请选择转交对象" />
<u-input v-model="forms.status" placeholder="请选择转交对象" @click="toSelectUser" disabled />
</u-form-item>
<u-form-item label="办理意见" prop="content" :border-bottom="false" label-position="top" class="contents">
@@ -35,12 +40,9 @@ export default {
fileIds: [],
},
flag: false,
show: false
}
},
computed: {},
watch: {},
onLoad() {},
onShow() {},
methods: {
submit() {
if (this.flag) return
@@ -82,6 +84,11 @@ export default {
}
})
},
toSelectUser() {
console.log(123)
uni.navigateTo({url: './SelectUser'})
}
},
}
</script>

View File

@@ -200,17 +200,17 @@
<div class="fixedBtn">
<div class="status00">
<div class="columns" @click="toTransfer">
<div class="columns" @click="toContent">
<img src="./components/22.png" alt="" />
<span class="hint">转交事件</span>
</div>
<div class="columns" @click="toReject">
<div class="columns" @click="toContent">
<img src="./components/22.png" alt="" />
<span class="hint">拒绝受理</span>
</div>
<div class="doIt" @click="ToMyDoIt">我来受理</div>
<div class="doIt" @click="toContent">我来受理</div>
</div>
<!-- <div class="endDoIt">我已办结</div> -->
@@ -246,20 +246,8 @@ export default {
}
})
},
toTransfer() {
console.log('转交事件')
uni.navigateTo({ url: `./Transfer?id=${this.id}` })
},
toReject() {
console.log('拒绝受理')
uni.navigateTo({ url: `./Reject?id=${this.id}` })
},
ToMyDoIt() {
console.log('我来受理')
uni.navigateTo({ url: `./DoThings?id=${this.id}` })
toContent() {
uni.navigateTo({ url: `./Content` })
},
},
}
@@ -504,9 +492,7 @@ uni-page-body {
width: 56%;
background: #3975c6;
text-align: center;
height: 112px;
line-height: 112px;
font-size: 36px;
font-weight: 500;
color: #fff;

View File

@@ -1,160 +0,0 @@
<template>
<div class="DoThings">
<div class="contents">
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="事件分类" prop="status" required :border-bottom="false" right-icon="arrow-right">
<u-input v-model="forms.status" placeholder="请选择事件分类" @click="show = true" />
<u-select v-model="show" :list="$dict.getDict('realityStatus')" value-name="dictValue" label-name="dictName" @confirm="selectStatus"></u-select>
</u-form-item>
<u-form-item label="拒绝意见" prop="content" :border-bottom="false" label-position="top" class="contents">
<u-input v-model="forms.content" placeholder="请写下你的拒绝意见..." type="textarea" auto-height height="100" maxlength="500" />
</u-form-item>
<div class="line"></div>
<u-form-item label="图片上传(最多9张)" prop="fileIds" :border-bottom="false" class="avatars" label-position="top">
<AiUploader :def.sync="forms.fileIds" multiple placeholder="上传图片" :limit="9"></AiUploader>
</u-form-item>
</u-form>
</div>
<div class="btn" @click="submit">转交事件</div>
</div>
</template>
<script>
export default {
name: 'DoThings',
components: {},
props: {},
data() {
return {
forms: {
status: '',
content: '',
fileIds: [],
},
flag: false,
show: false,
}
},
computed: {},
watch: {},
onLoad() {
this.$dict.load('realityStatus').then(() => {
// this.getDetail()
})
},
onShow() {},
methods: {
submit() {
if (this.flag) return
this.$refs.uForm.validate((valid) => {
if (valid) {
if (!this.forms.content) {
return this.$u.toast('请选择转交人')
}
const imgs = []
if (this.forms.fileIds) {
this.forms.fileIds.map((e) => {
imgs.push({ url: e.url, id: e.id })
})
}
this.flag = true
this.$http
.post(`/app/appvisitvondolence/addOrUpdate`, {
title: this.forms.title,
content: this.forms.content,
// images: JSON.stringify(imgs) || [],
images: imgs || [],
people: this.forms.people,
phone: this.forms.phone,
id: this.id,
})
.then((res) => {
if (res.code == 0) {
this.$u.toast('发布成功')
this.flag = false
uni.navigateTo({ url: `./AppHandSnapshot` })
}
})
} else {
this.$u.toast('失败')
}
})
},
},
}
</script>
<style scoped lang="scss">
.DoThings {
height: 100%;
.contents {
::v-deep .u-form {
.u-form-item {
padding: 0 45px !important;
.u-form-item__body {
.u-form-item--right__content__slot {
padding-bottom: 0;
.u-input {
text-align: right !important;
}
}
}
}
.u-form-item:first-child {
.u-form-item__body {
border-bottom: 1px solid #ddd;
}
}
.line {
height: 24px;
background: #f3f6f9;
}
.contents {
padding-bottom: 20px !important;
.u-form-item__body {
.u-form-item--right__content__slot {
.u-input {
text-align: left !important;
}
}
}
}
.avatars {
padding-bottom: 20px !important;
.u-form-item__body {
.default {
width: 160px;
height: 160px;
}
}
}
}
}
.btn {
position: fixed;
bottom: 0;
width: 100%;
box-sizing: border-box;
background: #3975c6;
padding: 34px 0;
text-align: center;
font-size: 32px;
font-weight: 500;
color: #ffffff;
}
}
</style>

View File

@@ -1,14 +1,20 @@
<template>
<div class="list">
<AiTopFixed>
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
<div class="select-top">
<AiSelect @data="(v) => (list = v.map((e) => e.value))" :list="list" placeholder="所属网格"></AiSelect>
<AiSelect @data="(v) => (list = v.map((e) => e.value))" :list="list" placeholder="办件状态"></AiSelect>
<div class="tab-item">
<span class="color-666">所属网格</span>
<img src="./components/img/down-icon.png" alt="">
</div>
<div class="tab-item">
<span class="color-666">办件状态</span>
<img src="./components/img/down-icon.png" alt="">
</div>
</div>
</AiTopFixed>
<template v-if="datas.length > 0">
<template>
<AiCard v-for="(item, i) in datas" :key="i" @click.native="goDetail(item, 1)">
<template #custom>
<div class="card-top">
@@ -31,9 +37,9 @@
</div>
</template>
</AiCard>
<AiEmpty v-if="!datas.length"></AiEmpty>
</template>
<AiEmpty v-else></AiEmpty>
<div class="pad-b120" v-if="datas.length"></div>
</div>
</template>
@@ -128,11 +134,28 @@ uni-page-body {
.select-top {
background: #fff;
display: flex;
justify-content: space-around;
.AiSelect {
margin: 30px 0;
padding: 24px 0;
.tab-item{
flex: 1;
text-align: center;
line-height: 48px;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
img{
width: 32px;
height: 32px;
margin-left: 8px;
vertical-align: middle;
}
}
.tab-item:nth-of-type(1) {
border-right: 1px solid #eee;
}
}
::v-deep .AiTopFixed .content{
padding: 0;
}
::v-deep .AiCard {
background: #f3f6f9;
padding: 24px 40px 0 32px;

View File

@@ -1,160 +0,0 @@
<template>
<div class="Reject">
<div class="contents">
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="事件分类" prop="status" required :border-bottom="false" right-icon="arrow-right">
<u-input v-model="forms.status" placeholder="请选择事件分类" @click="show = true" />
<u-select v-model="show" :list="$dict.getDict('realityStatus')" value-name="dictValue" label-name="dictName" @confirm="selectStatus"></u-select>
</u-form-item>
<u-form-item label="拒绝意见" prop="content" :border-bottom="false" label-position="top" class="contents">
<u-input v-model="forms.content" placeholder="请写下你的拒绝意见..." type="textarea" auto-height height="100" maxlength="500" />
</u-form-item>
<div class="line"></div>
<u-form-item label="图片上传(最多9张)" prop="fileIds" :border-bottom="false" class="avatars" label-position="top">
<AiUploader :def.sync="forms.fileIds" multiple placeholder="上传图片" :limit="9"></AiUploader>
</u-form-item>
</u-form>
</div>
<div class="btn" @click="submit">转交事件</div>
</div>
</template>
<script>
export default {
name: 'Reject',
components: {},
props: {},
data() {
return {
forms: {
status: '',
content: '',
fileIds: [],
},
flag: false,
show: false,
}
},
computed: {},
watch: {},
onLoad() {
this.$dict.load('realityStatus').then(() => {
// this.getDetail()
})
},
onShow() {},
methods: {
submit() {
if (this.flag) return
this.$refs.uForm.validate((valid) => {
if (valid) {
if (!this.forms.content) {
return this.$u.toast('请选择转交人')
}
const imgs = []
if (this.forms.fileIds) {
this.forms.fileIds.map((e) => {
imgs.push({ url: e.url, id: e.id })
})
}
this.flag = true
this.$http
.post(`/app/appvisitvondolence/addOrUpdate`, {
title: this.forms.title,
content: this.forms.content,
// images: JSON.stringify(imgs) || [],
images: imgs || [],
people: this.forms.people,
phone: this.forms.phone,
id: this.id,
})
.then((res) => {
if (res.code == 0) {
this.$u.toast('发布成功')
this.flag = false
uni.navigateTo({ url: `./AppHandSnapshot` })
}
})
} else {
this.$u.toast('失败')
}
})
},
},
}
</script>
<style scoped lang="scss">
.Reject {
height: 100%;
.contents {
::v-deep .u-form {
.u-form-item {
padding: 0 45px !important;
.u-form-item__body {
.u-form-item--right__content__slot {
padding-bottom: 0;
.u-input {
text-align: right !important;
}
}
}
}
.u-form-item:first-child {
.u-form-item__body {
border-bottom: 1px solid #ddd;
}
}
.line {
height: 24px;
background: #f3f6f9;
}
.contents {
padding-bottom: 20px !important;
.u-form-item__body {
.u-form-item--right__content__slot {
.u-input {
text-align: left !important;
}
}
}
}
.avatars {
padding-bottom: 20px !important;
.u-form-item__body {
.default {
width: 160px;
height: 160px;
}
}
}
}
}
.btn {
position: fixed;
bottom: 0;
width: 100%;
box-sizing: border-box;
background: #3975c6;
padding: 34px 0;
text-align: center;
font-size: 32px;
font-weight: 500;
color: #ffffff;
}
}
</style>

View File

@@ -0,0 +1,299 @@
<template>
<div class="SelectUser">
<div class="header-top">
<u-search v-model="keyword" placeholder="请输入姓名" :show-action="false" bg-color="#F5F5F5" search-icon-color="#CCCCCC" placeholder-color="#999999" @search="handerSearch" @clear="handerClear"></u-search>
</div>
<div class="header-middle">
<div class="hint">
<span :style="{ color: applicationName ? '#3F8DF5' : '' }" @click="back">可选范围</span>
<span> {{ applicationName ? ' / ' + applicationName : '' }}</span>
</div>
<div class="showTypes" v-if="showType">
<div class="empty-div"></div>
<div v-if="typeList.length > 0">
<div class="cards" v-for="(item, i) in typeList" :key="i" @click="toUserSelect(item)">
<img src="./components/img/tx@2x.png" alt="" />
<div class="rightes">
<div class="applicationNames">{{ item.applicationName }}</div>
<img src="./components/img/right-icon.png" alt="" class="imgs" />
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
<div class="showUsers" v-else>
<div v-if="userList.length > 0">
<div class="cards" v-for="(e, index) in userList" :key="index">
<div class="imges">
<img src="./components/img/xzh.png" alt="" class="imgselect" v-if="e.isChecked" @click="userClick(e, index)" />
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click="userClick(e, index)" />
<img src="./components/img/tx@2x.png" alt="" class="avatras" />
</div>
<div class="rights">
<div class="applicationNames">{{ e.name }}</div>
<div class="idNumbers">{{ e.idNumber && e.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1******$2') }}</div>
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
</div>
<div class="subBtn" @click="submit">
<div>确定选择</div>
</div>
<!-- <AiBck /> -->
</div>
</template>
<script>
export default {
name: 'SelectUser',
data() {
return {
typeList: [],
userList: [],
keyword: '',
current: 1,
showType: true,
applicationName: '',
applicationId: '',
selectUser: {},
}
},
computed: {},
watch: {},
onLoad() {
this.getTypeList()
},
onShow() {},
methods: {
userClick(row, index) {
if (this.userList[index].isChecked) {
//取消
this.userList[index].isChecked = false
this.selectUser = {}
} else {
this.userList.map((item) => {
item.isChecked = false
})
this.userList[index].isChecked = true
this.selectUser = row
}
},
getTypeList() {
this.userList = []
this.$http.post(`/app/appapplicationinfo/queryApplicationListByType?type=0&status=1`).then((res) => {
if (res.code == 0) {
this.typeList = res.data
}
})
},
// getUser(data) {
// this.applicationId = data.id
// this.appId = data.id
// this.getUsers()
// },
getUsers() {
uni.showLoading({
title: '加载中',
})
this.$http.post(`/app/appapplicationinfo/list?appId=${this.appId}&current=${this.current}&size=${999}`, { searchParam: this.keyword }).then((res) => {
if (res.code == 0) {
res.data.records.map((item) => {
item.isChecked = false
})
uni.hideLoading()
this.userList = res.data.records
}
})
},
submit() {
if (this.selectUser.id != null) {
uni.$emit('goBack', { selectUser: this.selectUser, applicationName: this.applicationName, applicationId: this.applicationId })
uni.navigateBack()
} else {
return this.$u.toast('请选择人员')
}
},
toUserSelect(item) {
this.applicationName = item.applicationName
this.applicationId = item.id
this.appId = item.id
this.getUsers()
this.showType = false
},
back() {
this.keyword = ''
this.typeList = []
this.userList = []
this.applicationName = ''
this.showType = true
this.getTypeList()
},
handerSearch(e) {
if (!this.showType) {
this.keyword = e
this.current = 1
// this.getUser()
this.getUsers()
}
},
handerClear() {
this.keyword = ''
this.current = 1
this.getUsers()
},
},
}
</script>
<style scoped lang="scss">
.SelectUser {
height: 100%;
background: #fff;
.header-top {
background: #fff;
padding: 20px 32px;
}
.header-middle {
padding-bottom: 140px;
.hint {
padding: 0 20px 0 32px;
height: 112px;
line-height: 112px;
box-shadow: 0px 1px 0px 0px #e4e5e6;
font-size: 30px;
font-weight: 500;
}
.showTypes {
.empty-div {
height: 16px;
background: #f5f5f5;
}
.cards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
// background: pink;
padding: 0 0 0 32px;
img {
width: 74px;
height: 74px;
border-radius: 8px;
}
.rightes {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 32px;
border-bottom: 1px solid #e4e5e6;
.applicationNames {
font-size: 36px;
font-weight: 500;
color: #333333;
}
.imgs {
width: 40px;
height: 40px;
margin-right: 20px;
}
}
}
}
.showUsers {
.cards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
// background: pink;
padding: 0 0 0 32px;
.imges {
display: flex;
align-items: center;
width: 200px;
.imgselect {
width: 48px;
height: 48px;
}
.avatras {
width: 74px;
height: 74px;
border-radius: 8px;
margin-left: 36px;
}
}
.rights {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 32px;
border-bottom: 1px solid #e4e5e6;
padding-right: 40px;
.applicationNames {
font-size: 36px;
font-weight: 500;
color: #333333;
}
.idNumbers {
color: #666;
}
}
}
}
}
.subBtn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 118px;
background: #f4f8fb;
div {
width: 192px;
height: 80px;
line-height: 80px;
text-align: center;
background: #1365dd;
border-radius: 4px;
font-size: 32px;
color: #fff;
margin: 20px 34px 0 0;
float: right;
}
}
}
</style>

View File

@@ -1,29 +0,0 @@
<template>
<div class="Selecter"></div>
</template>
<script>
export default {
name: 'Selecter',
components: {},
props: {
dict: Object,
instance: Function,
params: Object,
},
data() {
return {}
},
computed: {},
watch: {},
onLoad() {},
onShow() {},
methods: {},
}
</script>
<style scoped lang="scss">
.Selecter {
height: 100%;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB