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