BUG 30150
This commit is contained in:
@@ -1,72 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="doc-circulation ailist-wrapper">
|
<section class="AppReportAtWill">
|
||||||
<keep-alive :include="['List']">
|
<component ref="component" :is="currentPage" @change="onChange" :params="params" :instance="instance" :dict="dict"/>
|
||||||
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
</section>
|
||||||
</keep-alive>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import List from './components/List'
|
import List from './components/List'
|
||||||
import Detail from './components/Detail'
|
import Detail from './components/Detail'
|
||||||
import Setting from './components/Setting'
|
import Setting from './components/Setting'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppReportAtWill',
|
name: 'AppReportAtWill',
|
||||||
label: '随手拍',
|
label: '随手拍',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object
|
dict: Object
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
component: 'List',
|
component: 'List',
|
||||||
params: {}
|
params: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
currentPage() {
|
||||||
|
let {hash, query: {id}} = this.$route
|
||||||
|
return hash == "#Setting" ? Setting :
|
||||||
|
!!id ? Detail : List
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
List,
|
||||||
|
Detail,
|
||||||
|
Setting
|
||||||
|
},
|
||||||
|
|
||||||
components: {
|
methods: {
|
||||||
List,
|
onChange(data) {
|
||||||
Detail,
|
this.$router.push({query: data.params, hash: data.type == "Setting" ? "#Setting" : ""})
|
||||||
Setting
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted () {
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
onChange (data) {
|
|
||||||
if (data.type === 'Detail') {
|
|
||||||
this.component = 'Detail'
|
|
||||||
this.params = data.params
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data.type === 'Setting') {
|
|
||||||
this.component = 'Setting'
|
|
||||||
this.params = data.params
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data.type === 'list') {
|
|
||||||
this.component = 'List'
|
|
||||||
this.params = data.params
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (data.isRefresh) {
|
|
||||||
this.$refs.component.getList()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.doc-circulation {
|
.AppReportAtWill {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #F3F6F9;
|
background: #F3F6F9;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
<el-form-item label="转交" prop="name" style="width: 100%;" :rules="[{ required: true, message: '请选择网格员或网格' }]">
|
<el-form-item label="转交" prop="name" style="width: 100%;" :rules="[{ required: true, message: '请选择网格员或网格' }]">
|
||||||
<el-input disabled size="small" v-model="forwardForm.name" clearable placeholder="请选择网格员或网格">
|
<el-input disabled size="small" v-model="forwardForm.name" clearable placeholder="请选择网格员或网格">
|
||||||
<template slot="append">
|
<template slot="append">
|
||||||
<el-button @click="isShowUser = true">选择</el-button>
|
<el-button @click="getGirdList().then(()=>isShowUser=true )">选择</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -157,7 +157,7 @@ import {mapState} from 'vuex'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Detail',
|
name: 'Detail',
|
||||||
props: ['dict', 'instance', 'params'],
|
props: ['dict', 'instance'],
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -179,7 +179,6 @@ export default {
|
|||||||
processList: [],
|
processList: [],
|
||||||
dictList: [],
|
dictList: [],
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'girdList',
|
|
||||||
label: 'girdName'
|
label: 'girdName'
|
||||||
},
|
},
|
||||||
isShowForward: false,
|
isShowForward: false,
|
||||||
@@ -201,7 +200,6 @@ export default {
|
|||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.getDict()
|
this.getDict()
|
||||||
this.getGirdList()
|
|
||||||
this.dict.load('clapEventStatus').then(() => {
|
this.dict.load('clapEventStatus').then(() => {
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
})
|
})
|
||||||
@@ -210,7 +208,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getDetail() {
|
getDetail() {
|
||||||
this.instance.post('/app/appclapeventinfo/queryDetailById', null, {
|
this.instance.post('/app/appclapeventinfo/queryDetailById', null, {
|
||||||
params: {id: this.params.id}
|
params: {id: this.$route.query.id}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.detail = res.data
|
this.detail = res.data
|
||||||
@@ -228,9 +226,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getGirdList() {
|
getGirdList() {
|
||||||
this.instance.post(`/app/appgirdinfo/listAllByTop`).then(res => {
|
return this.instance.post(`/app/appgirdinfo/listAllByTop`).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.tree = this.formatList([res.data])
|
return this.tree = this.formatList([res.data])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -250,29 +248,16 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
formatList(list) {
|
formatList(list) {
|
||||||
let arr = []
|
|
||||||
for (let item of list) {
|
for (let item of list) {
|
||||||
if (item.girdMemberList && item.girdMemberList.length) {
|
item.children = [item.girdList, item.girdMemberList?.map(e => ({
|
||||||
let userList = JSON.parse(JSON.stringify(item.girdMemberList)).map(v => {
|
...e, isUser: true, girdName: item.girdName,
|
||||||
return {
|
girdId: item.id
|
||||||
...v,
|
})) || []].flat()
|
||||||
isUser: true,
|
if (item.girdList?.length > 0) {
|
||||||
girdName: item.girdName,
|
|
||||||
girdId: item.id
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
item.girdList = [
|
|
||||||
...userList
|
|
||||||
]
|
|
||||||
delete item.girdMemberList
|
|
||||||
}
|
|
||||||
if (item.girdList && item.girdList.length) {
|
|
||||||
this.formatList(item.girdList)
|
this.formatList(item.girdList)
|
||||||
}
|
}
|
||||||
arr.push(item)
|
|
||||||
}
|
}
|
||||||
return arr
|
return list
|
||||||
},
|
},
|
||||||
|
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
@@ -290,7 +275,7 @@ export default {
|
|||||||
if (v) {
|
if (v) {
|
||||||
this.instance.post('/app/appclapeventinfo/transferByManager', {
|
this.instance.post('/app/appclapeventinfo/transferByManager', {
|
||||||
...this.forwardForm,
|
...this.forwardForm,
|
||||||
id: this.params.id
|
id: this.$route.query.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.isShowForward = false
|
this.isShowForward = false
|
||||||
@@ -330,7 +315,7 @@ export default {
|
|||||||
|
|
||||||
close() {
|
close() {
|
||||||
this.$confirm('确定关闭该事件?').then(() => {
|
this.$confirm('确定关闭该事件?').then(() => {
|
||||||
this.instance.post(`/app/appmininotice/delete?ids=${this.params.id}`).then(res => {
|
this.instance.post(`/app/appmininotice/delete?ids=${this.$route.query.id}`).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success('删除成功!')
|
this.$message.success('删除成功!')
|
||||||
this.getList()
|
this.getList()
|
||||||
@@ -380,7 +365,7 @@ export default {
|
|||||||
this.instance.post('/app/appclapeventinfo/finishByManager', {
|
this.instance.post('/app/appclapeventinfo/finishByManager', {
|
||||||
...this.form,
|
...this.form,
|
||||||
groupName: this.dictList.filter(v => v.dictValue === this.form.groupId)[0].dictName,
|
groupName: this.dictList.filter(v => v.dictValue === this.form.groupId)[0].dictName,
|
||||||
id: this.params.id
|
id: this.$route.query.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.isShowAdd = false
|
this.isShowAdd = false
|
||||||
|
|||||||
Reference in New Issue
Block a user