第一书记跟随目录名称
This commit is contained in:
@@ -1,25 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="doc-circulation ailist-wrapper">
|
<div class="doc-circulation ailist-wrapper">
|
||||||
<keep-alive :include="['List']">
|
<keep-alive :include="['List']">
|
||||||
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
<component ref="component" :is="component" @change="onChange" :params="params" v-bind="$props"></component>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import List from './components/List'
|
import List from './components/List'
|
||||||
import Add from './components/Add'
|
import Add from './components/Add'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppVillageAuxiliarPolice',
|
name: 'AppVillageAuxiliarPolice',
|
||||||
label: '第一书记',
|
label: '第一书记',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object
|
dict: Object,
|
||||||
|
menuName: {default: "第一书记"}
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
component: 'List',
|
component: 'List',
|
||||||
params: {},
|
params: {},
|
||||||
@@ -32,11 +32,11 @@
|
|||||||
List
|
List
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted () {
|
mounted() {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onChange (data) {
|
onChange(data) {
|
||||||
if (data.type === 'Add') {
|
if (data.type === 'Add') {
|
||||||
this.component = 'Add'
|
this.component = 'Add'
|
||||||
this.params = data.params
|
this.params = data.params
|
||||||
@@ -54,13 +54,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.doc-circulation {
|
.doc-circulation {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #F3F6F9;
|
background: #F3F6F9;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-detail>
|
<ai-detail>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title :title="params.id ? '编辑第一书记' : '添加第一书记'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
<ai-title :title="(params.id?'编辑':'添加')+menuName" isShowBack isShowBottomBorder @onBackClick="cancel(false)"/>
|
||||||
</ai-title>
|
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-card title="基本信息">
|
<ai-card title="基本信息">
|
||||||
@@ -11,13 +10,16 @@
|
|||||||
<el-form-item label="服务区域" style="width: 100%;" prop="codeName">
|
<el-form-item label="服务区域" style="width: 100%;" prop="codeName">
|
||||||
<span style="color: #666;">{{ form.areaName }}</span>
|
<span style="color: #666;">{{ form.areaName }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 100%" label="姓名" prop="name" :rules="[{ required: true, message: '请输入姓名', trigger: 'blur' }]">
|
<el-form-item style="width: 100%" label="姓名" prop="name"
|
||||||
|
:rules="[{ required: true, message: '请输入姓名', trigger: 'blur' }]">
|
||||||
<el-input size="small" placeholder="请输入姓名" v-model="form.name"></el-input>
|
<el-input size="small" placeholder="请输入姓名" v-model="form.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 100%" label="电话" prop="phone" :rules="[{ required: true, message: '请输入电话', trigger: 'blur' }]">
|
<el-form-item style="width: 100%" label="电话" prop="phone"
|
||||||
|
:rules="[{ required: true, message: '请输入电话', trigger: 'blur' }]">
|
||||||
<el-input size="small" placeholder="请输入电话" maxlength="20" v-model="form.phone"></el-input>
|
<el-input size="small" placeholder="请输入电话" maxlength="20" v-model="form.phone"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 100%;" label="是否公开" prop="isPublic" :rules="[{ required: true, message: '请选择是否公开', trigger: 'change' }]">
|
<el-form-item style="width: 100%;" label="是否公开" prop="isPublic"
|
||||||
|
:rules="[{ required: true, message: '请选择是否公开', trigger: 'change' }]">
|
||||||
<el-radio-group v-model="form.isPublic">
|
<el-radio-group v-model="form.isPublic">
|
||||||
<el-radio label="1">是</el-radio>
|
<el-radio label="1">是</el-radio>
|
||||||
<el-radio label="0">否</el-radio>
|
<el-radio label="0">否</el-radio>
|
||||||
@@ -43,16 +45,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Add',
|
name: 'Add',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
params: Object
|
params: Object,
|
||||||
|
menuName: String
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
info: {},
|
info: {},
|
||||||
form: {
|
form: {
|
||||||
@@ -67,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
created() {
|
||||||
if (this.params && this.params.areaId && !this.params.id) {
|
if (this.params && this.params.areaId && !this.params.id) {
|
||||||
this.form.areaId = this.params.areaId
|
this.form.areaId = this.params.areaId
|
||||||
this.form.areaName = this.params.areaName
|
this.form.areaName = this.params.areaName
|
||||||
@@ -80,7 +83,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getInfo (id) {
|
getInfo(id) {
|
||||||
this.instance.post(`/app/appvillageauxiliarypolice/queryDetailById?id=${id}`).then(res => {
|
this.instance.post(`/app/appvillageauxiliarypolice/queryDetailById?id=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form = res.data
|
this.form = res.data
|
||||||
@@ -89,11 +92,11 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onClose () {
|
onClose() {
|
||||||
this.form.explain = ''
|
this.form.explain = ''
|
||||||
},
|
},
|
||||||
|
|
||||||
confirm () {
|
confirm() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.instance.post(`/app/appvillageauxiliarypolice/addOrUpdate`, {
|
this.instance.post(`/app/appvillageauxiliarypolice/addOrUpdate`, {
|
||||||
@@ -112,14 +115,14 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
cancel (isRefresh) {
|
cancel(isRefresh) {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'list',
|
type: 'list',
|
||||||
isRefresh: !!isRefresh
|
isRefresh: !!isRefresh
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-list class="villagecode">
|
<ai-list class="villagecode">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title title="第一书记" isShowBottomBorder></ai-title>
|
<ai-title :title="menuName" isShowBottomBorder></ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template #left>
|
<template #left>
|
||||||
<div class="villagecode-left">
|
<div class="villagecode-left">
|
||||||
@@ -91,7 +91,8 @@
|
|||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object
|
dict: Object,
|
||||||
|
menuName:String
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
Reference in New Issue
Block a user