增加是否可评论
This commit is contained in:
@@ -1,17 +1,17 @@
|
|||||||
<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" :instance="instance" :dict="dict"/>
|
||||||
</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'
|
||||||
import Detail from './components/Detail'
|
import Detail from './components/Detail'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppContentManage',
|
name: 'AppContentManage',
|
||||||
label: '内容管理',
|
label: '内容管理',
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
dict: Object
|
dict: Object
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
component: 'List',
|
component: 'List',
|
||||||
params: {},
|
params: {},
|
||||||
@@ -33,12 +33,11 @@
|
|||||||
List,
|
List,
|
||||||
Detail
|
Detail
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
mounted () {
|
this.dict.load("yesOrNo")
|
||||||
},
|
},
|
||||||
|
|
||||||
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
|
||||||
@@ -61,13 +60,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>
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
<template #content>
|
<template #content>
|
||||||
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
||||||
<el-form-item label="模块名称" style="width: 100%;" prop="moduleName" :rules="[{required: true, message: '请输入模块名称', trigger: 'blur'}]">
|
<el-form-item label="模块名称" style="width: 100%;" prop="moduleName" :rules="[{required: true, message: '请输入模块名称', trigger: 'blur'}]">
|
||||||
<el-input type="input" style="width: 300px" size="small" v-model="form.moduleName" clearable placeholder="请输入模块名称" maxlength="30" show-word-limit></el-input>
|
<el-input type="input" style="width: 300px" size="small" v-model="form.moduleName" clearable placeholder="请输入模块名称" maxlength="30"
|
||||||
|
show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="menuName" label="菜单名称" :rules="[{required: true, message: '请选择菜单', trigger: 'change'}]">
|
<el-form-item prop="menuName" label="菜单名称" :rules="[{required: true, message: '请选择菜单', trigger: 'change'}]">
|
||||||
<el-input type="input" style="width: 300px" disabled size="small" v-model="form.menuName" clearable placeholder="请选择菜单">
|
<el-input type="input" style="width: 300px" disabled size="small" v-model="form.menuName" clearable placeholder="请选择菜单">
|
||||||
@@ -24,6 +25,11 @@
|
|||||||
<el-radio label="1">是</el-radio>
|
<el-radio label="1">是</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="是否可评论" style="width: 100%;" prop="isComment" :rules="[{required: true, message: '请选择是否可评论'}]">
|
||||||
|
<el-radio-group v-model="form.isComment">
|
||||||
|
<el-radio v-for="op in dict.getDict('yseOrNo')" :label="op.dictValue">{{ op.dictName }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
@@ -54,9 +60,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Add',
|
name: 'Add',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@@ -65,7 +71,7 @@
|
|||||||
params: Object
|
params: Object
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
info: {},
|
info: {},
|
||||||
form: {
|
form: {
|
||||||
@@ -94,7 +100,7 @@
|
|||||||
...mapState(['user'])
|
...mapState(['user'])
|
||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
created() {
|
||||||
this.getMenuList()
|
this.getMenuList()
|
||||||
if (this.params && this.params.id) {
|
if (this.params && this.params.id) {
|
||||||
this.id = this.params.id
|
this.id = this.params.id
|
||||||
@@ -103,7 +109,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getInfo (id) {
|
getInfo(id) {
|
||||||
this.instance.post(`/app/appcontentmoduleinfo/queryDetailById?id=${id}`).then(res => {
|
this.instance.post(`/app/appcontentmoduleinfo/queryDetailById?id=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form = res.data
|
this.form = res.data
|
||||||
@@ -111,7 +117,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
showAdd () {
|
showAdd() {
|
||||||
this.isShowAdd = true
|
this.isShowAdd = true
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -125,11 +131,11 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onClose () {
|
onClose() {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onConfirm () {
|
onConfirm() {
|
||||||
if (this.chooseNode.type === '1') {
|
if (this.chooseNode.type === '1') {
|
||||||
this.form.menuId = this.chooseNode.id
|
this.form.menuId = this.chooseNode.id
|
||||||
this.form.menuName = this.chooseNode.name
|
this.form.menuName = this.chooseNode.name
|
||||||
@@ -140,11 +146,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange (e) {
|
onChange(e) {
|
||||||
this.chooseNode = e
|
this.chooseNode = e
|
||||||
},
|
},
|
||||||
|
|
||||||
getMenuList () {
|
getMenuList() {
|
||||||
this.instance.post(`/admin/menu/menuTree?containPermission=0`).then(res => {
|
this.instance.post(`/admin/menu/menuTree?containPermission=0`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.treeData = res.data
|
this.treeData = res.data
|
||||||
@@ -152,7 +158,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
confirm () {
|
confirm() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.instance.post(`/app/appcontentmoduleinfo/addOrUpdate`, {
|
this.instance.post(`/app/appcontentmoduleinfo/addOrUpdate`, {
|
||||||
@@ -170,14 +176,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">
|
||||||
|
|||||||
Reference in New Issue
Block a user