2021-12-18 14:55:11 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="Transfer">
|
|
|
|
|
<div class="contents">
|
|
|
|
|
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
|
2022-01-06 17:46:23 +08:00
|
|
|
<u-form-item label="事件分类" prop="groupName" required :border-bottom="false" right-icon="arrow-right">
|
|
|
|
|
<u-input v-model="forms.groupName" placeholder="请选择事件分类" @click="show = true" />
|
2022-01-05 16:53:11 +08:00
|
|
|
|
2022-01-06 17:46:23 +08:00
|
|
|
<u-select v-model="show" :list="myList" value-name="id" label-name="groupName" @confirm="selectStatus"></u-select>
|
2021-12-18 14:55:11 +08:00
|
|
|
</u-form-item>
|
|
|
|
|
|
2022-01-06 18:21:49 +08:00
|
|
|
<u-form-item :label="number == 3 ? '办结意见' : number == 2 ? '拒绝受理意见' : '办理意见'" prop="content" required :border-bottom="false" label-position="top" class="contents">
|
|
|
|
|
<u-input v-model="forms.content" :placeholder="number == 2 ? '请写下拒绝受理意见…' : '请写下你的办结意见...'" type="textarea" auto-height height="100" maxlength="500" />
|
2021-12-18 14:55:11 +08:00
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
|
<div class="line"></div>
|
|
|
|
|
|
2022-01-06 17:46:23 +08:00
|
|
|
<u-form-item label="图片上传(最多9张)" prop="files" :border-bottom="false" class="avatars" label-position="top">
|
|
|
|
|
<AiUploader :def.sync="forms.files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
|
2021-12-18 14:55:11 +08:00
|
|
|
</u-form-item>
|
2022-01-06 18:21:49 +08:00
|
|
|
|
|
|
|
|
<!-- <u-form-item label="转交给" prop="status" required :border-bottom="false" right-icon="arrow-right" class="first-form">
|
|
|
|
|
<u-input v-model="forms.status" placeholder="请选择转交对象" @click="toSelectUser" disabled />
|
|
|
|
|
|
|
|
|
|
<AiTreePicker :ops="treeList" v-model="forms.status" @select="handerSelect"> </AiTreePicker>
|
|
|
|
|
</u-form-item> -->
|
2021-12-18 14:55:11 +08:00
|
|
|
</u-form>
|
|
|
|
|
</div>
|
|
|
|
|
|
2022-01-06 19:59:51 +08:00
|
|
|
<div class="btn" v-if="this.number == 1" @click="submit3">
|
|
|
|
|
<span>转交事件</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="btn" v-if="this.number == 2" @click="submit2">
|
|
|
|
|
<span>拒绝受理</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="btn" v-if="this.number == 3" @click="submit3">
|
|
|
|
|
<span>我来受理</span>
|
2022-01-06 17:46:23 +08:00
|
|
|
</div>
|
2021-12-18 14:55:11 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
2022-01-06 17:46:23 +08:00
|
|
|
name: 'Content',
|
2021-12-18 14:55:11 +08:00
|
|
|
components: {},
|
|
|
|
|
props: {},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
forms: {
|
2022-01-06 17:46:23 +08:00
|
|
|
groupName: '',
|
|
|
|
|
groupId: '',
|
2021-12-18 14:55:11 +08:00
|
|
|
content: '',
|
2022-01-06 17:46:23 +08:00
|
|
|
files: [],
|
2021-12-18 14:55:11 +08:00
|
|
|
},
|
|
|
|
|
flag: false,
|
2022-01-06 17:46:23 +08:00
|
|
|
show: false,
|
|
|
|
|
number: '',
|
|
|
|
|
treeList: [],
|
|
|
|
|
myList: [],
|
|
|
|
|
groupName: '',
|
|
|
|
|
groupId: '',
|
|
|
|
|
id: '',
|
2021-12-18 14:55:11 +08:00
|
|
|
}
|
|
|
|
|
},
|
2022-01-06 17:46:23 +08:00
|
|
|
onLoad(o) {
|
|
|
|
|
console.log(o)
|
|
|
|
|
this.groupName = o.groupName
|
|
|
|
|
this.groupId = o.groupId
|
|
|
|
|
this.number = o.number
|
|
|
|
|
this.id = o.id
|
|
|
|
|
|
|
|
|
|
this.forms.groupId = this.groupId
|
|
|
|
|
this.forms.groupName = this.groupName
|
|
|
|
|
// this.getTree()
|
|
|
|
|
this.typeList()
|
|
|
|
|
},
|
2021-12-18 14:55:11 +08:00
|
|
|
methods: {
|
2022-01-06 19:59:51 +08:00
|
|
|
// 拒绝 /app/appclapeventinfo/finishByManager
|
|
|
|
|
// 同意 /app/appclapeventinfo/finishByGirdMember
|
2022-01-06 19:42:27 +08:00
|
|
|
|
|
|
|
|
// 拒绝
|
|
|
|
|
submit2() {
|
|
|
|
|
if (this.flag) return
|
|
|
|
|
|
|
|
|
|
this.$refs.uForm.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.number == 2 || this.number == 3) {
|
|
|
|
|
if (!this.forms.groupName) {
|
|
|
|
|
return this.$u.toast('请选择事件分类')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!this.forms.content) {
|
|
|
|
|
return this.$u.toast(this.number == 2 ? '请输入拒绝受理意见' : '请输入你的办结意见')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const imgs = []
|
|
|
|
|
if (this.forms.files) {
|
|
|
|
|
this.forms.files.map((e) => {
|
|
|
|
|
imgs.push({ url: e.url, id: e.id })
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.flag = true
|
|
|
|
|
this.$http
|
2022-01-06 19:59:51 +08:00
|
|
|
.post('/app/appclapeventinfo/refuse', {
|
2022-01-06 19:42:27 +08:00
|
|
|
groupName: this.forms.groupName,
|
|
|
|
|
groupId: this.forms.groupId,
|
|
|
|
|
content: this.forms.content,
|
|
|
|
|
files: imgs || [],
|
|
|
|
|
id: this.id,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
this.$u.toast('受理成功')
|
|
|
|
|
this.forms = {}
|
|
|
|
|
this.flag = false
|
|
|
|
|
uni.$emit('nextList')
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
uni.navigateBack()
|
|
|
|
|
}, 600)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.$u.toast('失败')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 同意
|
|
|
|
|
submit3() {
|
2021-12-18 14:55:11 +08:00
|
|
|
if (this.flag) return
|
|
|
|
|
|
|
|
|
|
this.$refs.uForm.validate((valid) => {
|
|
|
|
|
if (valid) {
|
2022-01-06 18:26:54 +08:00
|
|
|
if (this.number == 2 || this.number == 3) {
|
2022-01-06 17:46:23 +08:00
|
|
|
if (!this.forms.groupName) {
|
|
|
|
|
return this.$u.toast('请选择事件分类')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!this.forms.content) {
|
2022-01-06 18:26:54 +08:00
|
|
|
return this.$u.toast(this.number == 2 ? '请输入拒绝受理意见' : '请输入你的办结意见')
|
2022-01-06 17:46:23 +08:00
|
|
|
}
|
2021-12-18 14:55:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const imgs = []
|
2022-01-06 17:46:23 +08:00
|
|
|
if (this.forms.files) {
|
|
|
|
|
this.forms.files.map((e) => {
|
2021-12-18 14:55:11 +08:00
|
|
|
imgs.push({ url: e.url, id: e.id })
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.flag = true
|
|
|
|
|
this.$http
|
2022-01-06 19:42:27 +08:00
|
|
|
.post('/app/appclapeventinfo/finishByGirdMember', {
|
2022-01-06 17:46:23 +08:00
|
|
|
groupName: this.forms.groupName,
|
|
|
|
|
groupId: this.forms.groupId,
|
2021-12-18 14:55:11 +08:00
|
|
|
content: this.forms.content,
|
2022-01-06 19:42:27 +08:00
|
|
|
files: imgs || [],
|
2021-12-18 14:55:11 +08:00
|
|
|
id: this.id,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code == 0) {
|
2022-01-06 18:26:54 +08:00
|
|
|
this.$u.toast('受理成功')
|
2021-12-18 14:55:11 +08:00
|
|
|
this.flag = false
|
2022-01-06 19:42:27 +08:00
|
|
|
this.forms = {}
|
2022-01-06 17:46:23 +08:00
|
|
|
uni.$emit('nextList')
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
uni.navigateBack()
|
|
|
|
|
}, 600)
|
2021-12-18 14:55:11 +08:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.$u.toast('失败')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
2022-01-05 16:53:11 +08:00
|
|
|
|
2022-01-06 17:46:23 +08:00
|
|
|
typeList() {
|
|
|
|
|
this.$http
|
|
|
|
|
.post(`/app/appclapeventgroup/list`, null, {
|
|
|
|
|
params: {
|
|
|
|
|
size: 9999,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
this.myList = res.data.records
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
selectStatus(e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
if (this.show) {
|
|
|
|
|
this.forms.groupName = e[0].label
|
|
|
|
|
this.forms.groupId = e[0].value
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getTree() {
|
|
|
|
|
this.$http.post('/app/wxcp/wxtag/tree').then((res) => {
|
|
|
|
|
if (res?.data) {
|
|
|
|
|
console.log(res.data)
|
|
|
|
|
this.treeList = res.data
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handerSelect() {},
|
|
|
|
|
|
2022-01-05 16:53:11 +08:00
|
|
|
toSelectUser() {
|
2022-01-06 17:46:23 +08:00
|
|
|
uni.navigateTo({ url: './SelectUser' })
|
|
|
|
|
},
|
2021-12-18 14:55:11 +08:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.Transfer {
|
|
|
|
|
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>
|