调整村务公开
This commit is contained in:
33
project/oms/apps/AppArticles/AppArticles.vue
Normal file
33
project/oms/apps/AppArticles/AppArticles.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<section class="AppArticles">
|
||||
<component :is="currentComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Add from "./components/Add";
|
||||
import Detail from "./components/Detail";
|
||||
import Event from "./components/Event";
|
||||
|
||||
export default {
|
||||
name: "AppArticles",
|
||||
label: "村务公开(运营版)",
|
||||
components: {Event, Detail, Add},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
currentComponent() {
|
||||
return this.$route.hash == "#add" ? Add :
|
||||
!!this.$route.query?.id ? Detail : Event
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppArticles {
|
||||
}
|
||||
</style>
|
||||
@@ -54,7 +54,6 @@ export default {
|
||||
|
||||
props: {
|
||||
dict: Object,
|
||||
params: Object,
|
||||
instance: Function,
|
||||
areaId: String
|
||||
},
|
||||
@@ -78,7 +77,10 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
...mapState(['user']),
|
||||
params() {
|
||||
return this.$route.query
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
@@ -89,7 +91,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
onBack() {
|
||||
this.cancel()
|
||||
this.$router.push({})
|
||||
},
|
||||
|
||||
getInfo() {
|
||||
@@ -124,13 +126,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel(isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -20,30 +20,32 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
export default {
|
||||
name: 'detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
info: {}
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
computed: {
|
||||
params() {
|
||||
return this.$route.query
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo () {
|
||||
getInfo() {
|
||||
this.instance.post(`/appvillageinfo/queryDetailById?id=${this.params.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (res?.data) {
|
||||
this.info = res.data
|
||||
if (res.data.thumbUrl) {
|
||||
this.info.thumbUrl = JSON.parse(res.data.thumbUrl)
|
||||
@@ -52,26 +54,24 @@
|
||||
})
|
||||
},
|
||||
|
||||
onBack () {
|
||||
this.$emit('change', {
|
||||
type: 'list'
|
||||
})
|
||||
}
|
||||
onBack() {
|
||||
this.$router.push({})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cover {
|
||||
.cover {
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 140px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
}
|
||||
|
||||
.subTitle {
|
||||
.subTitle {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<template slot="content">
|
||||
<ai-search-bar>
|
||||
<template slot="left">
|
||||
<el-button icon="iconfont iconAdd" type="primary" size="small" @click="add">添加</el-button>
|
||||
<el-button icon="iconfont iconAdd" type="primary" size="small" @click="toAdd">添加</el-button>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
@@ -15,7 +15,7 @@
|
||||
v-model="search.title"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch" />
|
||||
suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<div class="ai-table">
|
||||
@@ -44,7 +44,7 @@
|
||||
<el-button
|
||||
type="text"
|
||||
title="编辑"
|
||||
@click="toAdd(row.id)">
|
||||
@click="toEdit(row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -83,7 +83,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item required label="地区" prop="areaId" :rules="[{required: true, message: '请选择发布地区'}]">
|
||||
<ai-area-get :instance="instance" v-model="dialogForm.areaId" :root="rootId" :name.sync="dialogForm.areaName" />
|
||||
<ai-area-get :instance="instance" v-model="dialogForm.areaId" :root="rootId"
|
||||
:name.sync="dialogForm.areaName"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
@@ -91,9 +92,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'event',
|
||||
|
||||
props: {
|
||||
@@ -105,16 +106,16 @@
|
||||
...mapState(['user']),
|
||||
colConfigs() {
|
||||
return [
|
||||
{ prop: 'type', label: '类型', formart: v => this.dict.getLabel('villInfoType', v) },
|
||||
{ prop: 'title', label: '标题', align: 'left' },
|
||||
{ prop: 'createDate', label: '创建时间', dateFormart: 'YYYY-MM-DD', align: 'center' },
|
||||
{ prop: 'createUser', label: '发布人', align: 'center' },
|
||||
{ slot: 'options', label: '操作' }
|
||||
{prop: 'type', label: '类型', formart: v => this.dict.getLabel('villInfoType', v)},
|
||||
{prop: 'title', label: '标题', align: 'left'},
|
||||
{prop: 'createDate', label: '创建时间', dateFormart: 'YYYY-MM-DD', align: 'center'},
|
||||
{prop: 'createUser', label: '发布人', align: 'center'},
|
||||
{slot: 'options', label: '操作'}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
@@ -131,7 +132,7 @@
|
||||
rootId: ''
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
this.dict.load('villInfoType').then(() => {
|
||||
this.getList()
|
||||
this.getsaasList()
|
||||
@@ -151,7 +152,7 @@
|
||||
|
||||
getCompanyList() {
|
||||
this.instance.post("/appCorp/page", null, {
|
||||
params: {saasId:this.dialogForm.saasId, size: 10000}
|
||||
params: {saasId: this.dialogForm.saasId, size: 10000}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.companyList = res.data.records
|
||||
@@ -164,14 +165,14 @@
|
||||
|
||||
selectCompany() {
|
||||
this.companyList.map(item => {
|
||||
if(item.id == this.dialogForm.corpId) {
|
||||
if (item.id == this.dialogForm.corpId) {
|
||||
this.rootId = item.areaId
|
||||
this.dialogForm.areaId = item.areaId
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getList () {
|
||||
getList() {
|
||||
this.instance.post(`/appvillageinfo/list`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
@@ -185,50 +186,23 @@
|
||||
})
|
||||
},
|
||||
|
||||
publish (params) {
|
||||
publish(params) {
|
||||
this.dialogForm.id = params.id
|
||||
this.dialog = true
|
||||
},
|
||||
|
||||
toAdd (id) {
|
||||
this.$emit('change', {
|
||||
type: 'add',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
toAdd() {
|
||||
this.$router.push({hash: "#add"})
|
||||
},
|
||||
toEdit(id) {
|
||||
this.$router.push({hash: "#add", query: {id}})
|
||||
},
|
||||
|
||||
add () {
|
||||
this.$emit('change', {
|
||||
type: 'add',
|
||||
params: {
|
||||
id: ''
|
||||
}
|
||||
})
|
||||
toDetail(id) {
|
||||
this.$router.push({query: {id}})
|
||||
},
|
||||
|
||||
toEdit (id) {
|
||||
this.$emit('change', {
|
||||
type: 'add',
|
||||
params: {
|
||||
type: 'ReportAdd',
|
||||
id
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
this.$emit('change', {
|
||||
type: 'detail',
|
||||
params: {
|
||||
type: 'eventDetail',
|
||||
id
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appvillageinfo/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
@@ -255,22 +229,25 @@
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.event {
|
||||
.event {
|
||||
height: 100%;
|
||||
|
||||
::v-deep th {
|
||||
font-weight: bold!important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
::v-deep .table-options{
|
||||
span{
|
||||
font-size: 14px!important;
|
||||
|
||||
::v-deep .table-options {
|
||||
span {
|
||||
font-size: 14px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.table-btn {
|
||||
}
|
||||
|
||||
.table-btn {
|
||||
margin-right: 16px;
|
||||
font-size: 14px;
|
||||
color: #2266FF;
|
||||
@@ -288,5 +265,5 @@
|
||||
color: #f46;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user