Commit 76f51f9d by Lyan

页面样式更改

parent 5efb5239
...@@ -434,13 +434,37 @@ img { ...@@ -434,13 +434,37 @@ img {
>.el-form,>.table-list,>.add-btn,.form-list,.sub-btn{ >.el-form,>.table-list,>.add-btn,.form-list,.sub-btn{
width: 96%; width: 96%;
margin-left: 2%; // margin-left: 2%;
background-color: #fff; background-color: #fff;
} }
.avatar-uploader>.el-upload {
border: 2px dashed #666666;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 40px;
color: #666666;
width: 64px;
height: 64px;
line-height: 64px;
text-align: center;
}
.avatar {
width: 64px;
height: 64px;
display: block;
}
.form-list{ .form-list{
margin-top: 20px; // margin-top: 20px;
padding: 40px 0 100px 20%; // padding: 40px 0 100px 20%;
color: rgba(0, 0, 0, 0.847058823529412); color: rgba(0, 0, 0, 0.847058823529412);
.base-info{ .base-info{
font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC'; font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC';
...@@ -488,29 +512,7 @@ img { ...@@ -488,29 +512,7 @@ img {
.el-form-item{ .el-form-item{
margin-bottom:32px; margin-bottom:32px;
} }
.avatar-uploader>.el-upload {
border: 2px dashed #666666;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 40px;
color: #666666;
width: 64px;
height: 64px;
line-height: 64px;
text-align: center;
}
.avatar {
width: 64px;
height: 64px;
display: block;
}
} }
.sub-btn{ .sub-btn{
margin-top: 20px; margin-top: 20px;
...@@ -527,7 +529,7 @@ img { ...@@ -527,7 +529,7 @@ img {
} }
>.el-form{ >.el-form{
position: relative; position: relative;
margin-top: 25px; // margin-top: 25px;
padding-top: 25px; padding-top: 25px;
border-bottom: 1px solid rgba(242, 242, 242, 1); border-bottom: 1px solid rgba(242, 242, 242, 1);
...@@ -572,14 +574,14 @@ img { ...@@ -572,14 +574,14 @@ img {
border-top-color:#666 border-top-color:#666
} }
.cell { .cell {
white-space: pre-line; // white-space: pre-line;
} }
} }
.el-table td.is-center, .el-table th.is-center{ .el-table td.is-center, .el-table th.is-center{
text-align: left; text-align: left;
font-weight: 500; font-weight: 500;
font-style: normal; font-style: normal;
font-size: 14px; // font-size: 14px;
color: #656565; color: #656565;
line-height: 18px; line-height: 18px;
} }
...@@ -592,6 +594,12 @@ img { ...@@ -592,6 +594,12 @@ img {
} }
} }
.el-dialog__body{
p{
font-size: 12px;
line-height: 12px;
}
}
} }
......
...@@ -36,6 +36,8 @@ const mainRoutes = { ...@@ -36,6 +36,8 @@ const mainRoutes = {
// 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理! // 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!
{ path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } }, { path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } },
{ path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } }, { path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } },
{ path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } },
{ path: '/demo-ueditor', component: _import('demo/ueditor'), name: 'demo-ueditor', meta: { title: 'demo-ueditor', isTab: true } },
{ path: '/picture-add', component: _import('modules/info/picture-add-or-update'), name: 'picture-add', meta: { title: '图片资讯添加', isTab: true } }, { path: '/picture-add', component: _import('modules/info/picture-add-or-update'), name: 'picture-add', meta: { title: '图片资讯添加', isTab: true } },
{ path: '/picture-update', component: _import('modules/info/picture-add-or-update'), name: 'picture-update', meta: { title: '图片资讯编辑', isTab: true } }, { path: '/picture-update', component: _import('modules/info/picture-add-or-update'), name: 'picture-update', meta: { title: '图片资讯编辑', isTab: true } },
......
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px" v-loading='loading'> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px" v-loading='loading'>
<el-form-item label="标题:" prop="title"> <el-form-item label="标题:" prop="title">
<el-input v-model="dataForm.title" placeholder="请输入标题" size="small" v-show="!showInfo"></el-input> <el-input v-model="dataForm.title" placeholder="请输入标题" size="small" v-show="!showInfo"></el-input>
...@@ -80,14 +81,11 @@ ...@@ -80,14 +81,11 @@
<p><img :src="imgUrlStr" class="avatar" v-show="showInfo"></p> <p><img :src="imgUrlStr" class="avatar" v-show="showInfo"></p>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()'>重置</el-button> </span>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button> </el-dialog>
</span>
</div>
</div>
</template> </template>
<script> <script>
...@@ -95,7 +93,8 @@ ...@@ -95,7 +93,8 @@
data () { data () {
return { return {
loading: false, loading: false,
showInfo: !!this.$route.query.showInfo, showInfo: false,
visible: false,
title: '', title: '',
dataForm: { dataForm: {
id: 0, id: 0,
...@@ -167,25 +166,19 @@ ...@@ -167,25 +166,19 @@
mounted () { mounted () {
}, },
activated () {
if (this.$route.query.id) {
this.init(this.$route.query.id)
} else {
this.clearInp()
}
this.title = !this.$route.query.id ? '添加首页轮播' : '修改首页轮播'
},
created () { created () {
this.$route.meta.title = !this.$route.query.id ? '添加首页轮播' : '修改首页轮播' this.$route.meta.title = !this.$route.query.id ? '添加首页轮播' : '修改首页轮播'
}, },
methods: { methods: {
init (id) { init (id, showInfo) {
this.loading = true
this.dataForm.id = id || 0 this.dataForm.id = id || 0
this.visible = true this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.clearInp()
if (this.dataForm.id) { if (this.dataForm.id) {
this.loading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/indexCarouselManage/info/${this.dataForm.id}`), url: this.$http.adornUrl(`/office/indexCarouselManage/info/${this.dataForm.id}`),
method: 'get', method: 'get',
...@@ -235,7 +228,8 @@ ...@@ -235,7 +228,8 @@
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'info-indexcarouselmanage'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
......
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'>
<div class="base-info">基本信息</div>
<el-form-item label="原始标题:" prop="titleOld"> <el-form-item label="原始标题:" prop="titleOld">
<el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo" size="small"></el-input> <el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo" size="small"></el-input>
<p v-show="showInfo">{{dataForm.titleOld}}</p> <p v-show="showInfo">{{dataForm.titleOld}}</p>
...@@ -101,14 +101,11 @@ ...@@ -101,14 +101,11 @@
<div v-show="showInfo" v-html="dataForm.content"></div> <div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()'>重置</el-button> </span>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button> </el-dialog>
</span>
</div>
</div>
</template> </template>
<script> <script>
...@@ -120,7 +117,8 @@ ...@@ -120,7 +117,8 @@
data () { data () {
return { return {
loading: false, loading: false,
showInfo: this.$route.query.showInfo, showInfo: false,
visible: false,
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
...@@ -200,17 +198,9 @@ ...@@ -200,17 +198,9 @@
cclassName: '' cclassName: ''
} }
}, },
activated () {
this.getClassList([])
if (this.$route.query.id) {
this.init(this.$route.query.id)
} else {
this.clearInp()
}
this.title = !this.$route.query.id ? '添加文章' : '修改文章'
},
created () {
created () {
this.getClassList([])
}, },
mounted () { mounted () {
console.log(this.classidList) console.log(this.classidList)
...@@ -222,12 +212,14 @@ ...@@ -222,12 +212,14 @@
}) })
return arr[0].name return arr[0].name
}, },
init (id) { init (id, showInfo) {
this.loading = true
this.dataForm.id = id || 0 this.dataForm.id = id || 0
this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.clearInp()
if (this.dataForm.id) { if (this.dataForm.id) {
this.loading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/news/info/${this.dataForm.id}`), url: this.$http.adornUrl(`/office/news/info/${this.dataForm.id}`),
method: 'get', method: 'get',
...@@ -279,7 +271,8 @@ ...@@ -279,7 +271,8 @@
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'info-news'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
...@@ -357,7 +350,7 @@ ...@@ -357,7 +350,7 @@
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.imgUrlStr = '' this.imgUrlStr = ''
this.dialogVisible = false this.dialogVisible = false
this.dataForm.content = '' this.ueditor.value = ''
}, },
// 更新父子组件内容 // 更新父子组件内容
editorReady (instance) { editorReady (instance) {
...@@ -370,7 +363,7 @@ ...@@ -370,7 +363,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.form-list{ /* .form-list{
padding-left: 4%!important; padding-left: 4%!important;
} }
.el-form-item__content{ .el-form-item__content{
...@@ -381,5 +374,5 @@ ...@@ -381,5 +374,5 @@
} }
.edui-editor{ .edui-editor{
width: 100%; width: 100%;
} } */
</style> </style>
\ No newline at end of file
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'>
<div class="base-info">基本信息</div> <div class="base-info">基本信息</div>
<el-form-item label="原始标题:" prop="titleOld"> <el-form-item label="原始标题:" prop="titleOld">
...@@ -93,14 +94,11 @@ ...@@ -93,14 +94,11 @@
<div v-show="showInfo" v-html="dataForm.content"></div> <div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()'>重置</el-button> </span>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button> </el-dialog>
</span>
</div>
</div>
</template> </template>
<script> <script>
...@@ -112,7 +110,8 @@ ...@@ -112,7 +110,8 @@
data () { data () {
return { return {
loading: false, loading: false,
showInfo: !!this.$route.query.showInfo, showInfo: false,
visible: false,
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
...@@ -185,25 +184,20 @@ ...@@ -185,25 +184,20 @@
title: '' title: ''
} }
}, },
activated () {
if (this.$route.query.id) {
this.init(this.$route.query.id)
} else {
this.clearInp()
}
this.title = !this.$route.query.id ? '添加视频' : '修改视频'
},
created () { created () {
}, },
mounted () { mounted () {
}, },
methods: { methods: {
init (id) { init (id, showInfo) {
this.loading = true
this.dataForm.id = id || 0 this.dataForm.id = id || 0
this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.clearInp()
if (this.dataForm.id) { if (this.dataForm.id) {
this.loading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/news/info/${this.dataForm.id}`), url: this.$http.adornUrl(`/office/news/info/${this.dataForm.id}`),
method: 'get', method: 'get',
...@@ -264,7 +258,8 @@ ...@@ -264,7 +258,8 @@
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'info-newsmovie'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
...@@ -328,7 +323,7 @@ ...@@ -328,7 +323,7 @@
this.videoUrlStr = windowURL.createObjectURL(file) this.videoUrlStr = windowURL.createObjectURL(file)
this.dialogVisible2 = true this.dialogVisible2 = true
this.videoUrl.append('file', file) this.videoUrl.append('file', file)
console.log(this.videUrl.get('file')) console.log(file)
} }
}, },
UploadVideo () { UploadVideo () {
......
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'>
<div class="base-info">基本信息</div> <div class="base-info">基本信息</div>
<el-form-item label="专题描述:" prop="title"> <el-form-item label="专题描述:" prop="title">
...@@ -84,14 +85,11 @@ ...@@ -84,14 +85,11 @@
<div v-show="showInfo" v-html="dataForm.content"></div> <div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()'>重置</el-button> </span>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button> </el-dialog>
</span>
</div>
</div>
</template> </template>
<script> <script>
...@@ -103,7 +101,8 @@ ...@@ -103,7 +101,8 @@
data () { data () {
return { return {
loading: false, loading: false,
showInfo: !!this.$route.query.showInfo, showInfo: false,
visible: false,
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
...@@ -178,14 +177,7 @@ ...@@ -178,14 +177,7 @@
watch: { watch: {
}, },
activated () {
if (this.$route.query.id) {
this.init(this.$route.query.id)
} else {
this.clearInp()
}
this.title = !this.$route.query.id ? '添加深度专题' : '修改深度专题'
},
created () { created () {
this.getClassList([]) this.getClassList([])
}, },
...@@ -193,12 +185,14 @@ ...@@ -193,12 +185,14 @@
}, },
methods: { methods: {
init (id) { init (id, showInfo) {
this.loading = true
this.dataForm.id = id || 0 this.dataForm.id = id || 0
this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.clearInp()
if (this.dataForm.id) { if (this.dataForm.id) {
this.loading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/newtopic/info/${this.dataForm.id}`), url: this.$http.adornUrl(`/office/newtopic/info/${this.dataForm.id}`),
method: 'get', method: 'get',
...@@ -244,7 +238,8 @@ ...@@ -244,7 +238,8 @@
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'info-newtopic'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
...@@ -314,7 +309,7 @@ ...@@ -314,7 +309,7 @@
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.imgUrlStr = '' this.imgUrlStr = ''
this.dialogVisible = false this.dialogVisible = false
this.$refs.ue.setClearUEContent('') this.ueditor.value = ''
}, },
// 更新父子组件内容 // 更新父子组件内容
editorReady (instance) { editorReady (instance) {
......
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
:visible.sync="visible">
<el-form <el-form
:model='dataForm' :model='dataForm'
:rules='dataRule' :rules='dataRule'
...@@ -70,15 +71,11 @@ ...@@ -70,15 +71,11 @@
<p><img :src="imgUrlStr" class="avatar" v-show="showInfo"></p> <p><img :src="imgUrlStr" class="avatar" v-show="showInfo"></p>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()' >重置</el-button>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button>
</span> </span>
</div> </el-dialog>
</div>
</template> </template>
<script> <script>
...@@ -86,9 +83,11 @@ export default { ...@@ -86,9 +83,11 @@ export default {
data () { data () {
return { return {
loading: false, loading: false,
showInfo: !!this.$route.query.showInfo, visible: false,
showInfo: false,
title: '', title: '',
dataForm: { dataForm: {
id: 0,
title: '', title: '',
pictureType: '', pictureType: '',
picFile: '', picFile: '',
...@@ -176,26 +175,22 @@ export default { ...@@ -176,26 +175,22 @@ export default {
dialogVisible: false dialogVisible: false
} }
}, },
activated () {
if (this.$route.query.id) {
this.init(this.$route.query.id)
} else {
this.clearInp()
}
},
created () { created () {
}, },
methods: { methods: {
init (id) { init (id, showInfo) {
this.loading = true this.dataForm.id = id || 0
this.dataForm.pictureid = id || 0 this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.clearInp()
if (this.dataForm.pictureid) { if (this.dataForm.id) {
this.loading = true
this.$http({ this.$http({
url: this.$http.adornUrl( url: this.$http.adornUrl(
`/office/picture/info/${this.dataForm.pictureid}` `/office/picture/info/${this.dataForm.id}`
), ),
method: 'get', method: 'get',
params: this.$http.adornParams() params: this.$http.adornParams()
...@@ -245,7 +240,8 @@ export default { ...@@ -245,7 +240,8 @@ export default {
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'info-picture'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
...@@ -296,7 +292,9 @@ export default { ...@@ -296,7 +292,9 @@ export default {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.imgUrlStr = '' this.imgUrlStr = ''
this.dialogVisible = false this.dialogVisible = false
this.ueditor.value = ''
} }
} }
} }
</script> </script>
......
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'>
<div class="base-info">基本信息</div>
<el-form-item label="原始标题:" prop="oldtitle"> <el-form-item label="原始标题:" prop="oldtitle">
<el-input v-model="dataForm.oldtitle" placeholder="请输入显示标题" v-show="!showInfo" size="small"></el-input> <el-input v-model="dataForm.oldtitle" placeholder="请输入显示标题" v-show="!showInfo" size="small"></el-input>
<p v-show="showInfo">{{dataForm.titleOld}}</p> <p v-show="showInfo">{{dataForm.titleOld}}</p>
...@@ -81,14 +81,11 @@ ...@@ -81,14 +81,11 @@
<div v-show="showInfo" v-html="dataForm.content"></div> <div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()'>重置</el-button>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button>
</span> </span>
</div> </el-dialog>
</div>
</template> </template>
<script> <script>
...@@ -100,7 +97,8 @@ ...@@ -100,7 +97,8 @@
data () { data () {
return { return {
loading: false, loading: false,
showInfo: this.$route.query.showInfo || false, visible: false,
showInfo: false,
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
...@@ -182,23 +180,17 @@ ...@@ -182,23 +180,17 @@
title: '' title: ''
} }
}, },
activated () {
if (this.$route.query.id) {
this.init(this.$route.query.id)
} else {
this.clearInp()
}
this.title = !this.$route.query.id ? '新增' : '修改'
},
created () { created () {
this.getMedicalTypeList() this.getMedicalTypeList()
}, },
methods: { methods: {
init (id) { init (id, showInfo) {
this.loading = true
this.dataForm.id = id || 0 this.dataForm.id = id || 0
this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.clearInp()
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/logistics/info/${this.dataForm.id}`), url: this.$http.adornUrl(`/office/logistics/info/${this.dataForm.id}`),
...@@ -252,7 +244,8 @@ ...@@ -252,7 +244,8 @@
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'logistics-logistics'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
...@@ -267,7 +260,7 @@ ...@@ -267,7 +260,7 @@
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.imgUrlStr = '' this.imgUrlStr = ''
this.dialogVisible = false this.dialogVisible = false
this.dataForm.value = '' this.ueditor.value = ''
}, },
// 获取医疗管理列表 // 获取医疗管理列表
getMedicalTypeList () { getMedicalTypeList () {
...@@ -285,17 +278,3 @@ ...@@ -285,17 +278,3 @@
} }
} }
</script> </script>
<style scoped>
.form-list{
padding-left: 4%!important;
}
.el-form-item__content{
width: 50%;
}
.el-select,.el-input{
width: 241px!important;
}
.edui-editor{
width: 100%;
}
</style>
\ No newline at end of file
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'>
<div class="base-info">基本信息</div>
<el-form-item label="标题:" prop="title"> <el-form-item label="标题:" prop="title">
<el-input v-model="dataForm.title" placeholder="请输入显示标题" v-show="!showInfo" size="small"></el-input> <el-input v-model="dataForm.title" placeholder="请输入显示标题" v-show="!showInfo" size="small"></el-input>
<p v-show="showInfo">{{dataForm.title}}</p> <p v-show="showInfo">{{dataForm.title}}</p>
...@@ -77,14 +77,11 @@ ...@@ -77,14 +77,11 @@
<div v-show="showInfo" v-html="dataForm.content"></div> <div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()'>重置</el-button>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button>
</span> </span>
</div> </el-dialog>
</div>
</template> </template>
<script> <script>
...@@ -96,7 +93,8 @@ ...@@ -96,7 +93,8 @@
data () { data () {
return { return {
loading: false, loading: false,
showInfo: this.$route.query.showInfo || false, visible: false,
showInfo: false,
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
...@@ -161,14 +159,6 @@ ...@@ -161,14 +159,6 @@
title: '' title: ''
} }
}, },
activated () {
if (this.$route.query.id) {
this.init(this.$route.query.id)
} else {
this.clearInp()
}
this.title = !this.$route.query.id ? '新增' : '修改'
},
created () { created () {
this.getMedicalTypeList() this.getMedicalTypeList()
...@@ -176,11 +166,12 @@ ...@@ -176,11 +166,12 @@
mounted () { mounted () {
}, },
methods: { methods: {
init (id) { init (id, showInfo) {
this.loading = true
this.dataForm.id = id || 0 this.dataForm.id = id || 0
this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.clearInp()
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/medical/info/${this.dataForm.id}`), url: this.$http.adornUrl(`/office/medical/info/${this.dataForm.id}`),
...@@ -233,7 +224,8 @@ ...@@ -233,7 +224,8 @@
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'medical-medical'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
...@@ -261,22 +253,8 @@ ...@@ -261,22 +253,8 @@
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.imgUrlStr = '' this.imgUrlStr = ''
this.dialogVisible = false this.dialogVisible = false
this.dataForm.value = '' this.ueditor.value = ''
} }
} }
} }
</script> </script>
<style scoped>
.form-list{
padding-left: 4%!important;
}
.el-form-item__content{
width: 50%;
}
.el-select,.el-input{
width: 241px!important;
}
.edui-editor{
width: 100%;
}
</style>
\ No newline at end of file
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'>
<div class="base-info">基本信息</div>
<el-form-item label="原始标题:" prop="titleOld"> <el-form-item label="原始标题:" prop="titleOld">
<el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo" size="small"></el-input> <el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo" size="small"></el-input>
<p v-show="showInfo">{{dataForm.titleOld}}</p> <p v-show="showInfo">{{dataForm.titleOld}}</p>
...@@ -75,14 +75,11 @@ ...@@ -75,14 +75,11 @@
<div v-show="showInfo" v-html="dataForm.content"></div> <div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()'>重置</el-button> </span>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button> </el-dialog>
</span>
</div>
</div>
</template> </template>
<script> <script>
...@@ -94,7 +91,8 @@ ...@@ -94,7 +91,8 @@
data () { data () {
return { return {
loading: false, loading: false,
showInfo: this.$route.query.showInfo, visible: false,
showInfo: false,
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
...@@ -163,22 +161,15 @@ ...@@ -163,22 +161,15 @@
title: '' title: ''
} }
}, },
activated () {
if (this.$route.query.id) {
this.init(this.$route.query.id)
} else {
this.clearInp()
}
this.title = !this.$route.query.id ? '添加' : '修改'
},
created () { created () {
}, },
methods: { methods: {
init (id) { init (id, showInfo) {
this.loading = true
this.dataForm.id = id || 0 this.dataForm.id = id || 0
this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
// this.$refs['dataForm'].resetFields()
this.clearInp() this.clearInp()
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http({ this.$http({
...@@ -230,7 +221,8 @@ ...@@ -230,7 +221,8 @@
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'party-center'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
...@@ -290,7 +282,7 @@ ...@@ -290,7 +282,7 @@
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.imgUrlStr = '' this.imgUrlStr = ''
this.dialogVisible = false this.dialogVisible = false
this.dataForm.content = '' this.ueditor.value = ''
}, },
// 更新父子组件内容 // 更新父子组件内容
editorReady (instance) { editorReady (instance) {
...@@ -302,17 +294,3 @@ ...@@ -302,17 +294,3 @@
} }
} }
</script> </script>
<style scoped>
.form-list{
padding-left: 4%!important;
}
.el-form-item__content{
width: 50%;
}
.el-select,.el-input{
width: 241px!important;
}
.edui-editor{
width: 100%;
}
</style>
\ No newline at end of file
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'>
<div class="base-info">基本信息</div>
<el-form-item label="原始标题:" prop="titleOld"> <el-form-item label="原始标题:" prop="titleOld">
<el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo" size="small"></el-input> <el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo" size="small"></el-input>
<p v-show="showInfo">{{dataForm.titleOld}}</p> <p v-show="showInfo">{{dataForm.titleOld}}</p>
...@@ -75,14 +75,11 @@ ...@@ -75,14 +75,11 @@
<div v-show="showInfo" v-html="dataForm.content"></div> <div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()'>重置</el-button> </span>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button> </el-dialog>
</span>
</div>
</div>
</template> </template>
<script> <script>
...@@ -94,7 +91,8 @@ ...@@ -94,7 +91,8 @@
data () { data () {
return { return {
loading: false, loading: false,
showInfo: this.$route.query.showInfo, visible: false,
showInfo: false,
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
...@@ -160,22 +158,16 @@ ...@@ -160,22 +158,16 @@
title: '' title: ''
} }
}, },
activated () {
if (this.$route.query.id) {
this.init(this.$route.query.id)
} else {
this.clearInp()
}
this.title = !this.$route.query.id ? '添加' : '修改'
},
created () { created () {
}, },
methods: { methods: {
init (id) { init (id, showInfo) {
this.loading = true
this.dataForm.id = id || 0 this.dataForm.id = id || 0
this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.clearInp()
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/news/info/${this.dataForm.id}`), url: this.$http.adornUrl(`/office/news/info/${this.dataForm.id}`),
...@@ -226,7 +218,8 @@ ...@@ -226,7 +218,8 @@
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'party-hotFlow'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
...@@ -286,7 +279,7 @@ ...@@ -286,7 +279,7 @@
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.imgUrlStr = '' this.imgUrlStr = ''
this.dialogVisible = false this.dialogVisible = false
this.dataForm.content = '' this.ueditor.value = ''
}, },
// 更新父子组件内容 // 更新父子组件内容
editorReady (instance) { editorReady (instance) {
...@@ -298,17 +291,3 @@ ...@@ -298,17 +291,3 @@
} }
} }
</script> </script>
<style scoped>
.form-list{
padding-left: 4%!important;
}
.el-form-item__content{
width: 50%;
}
.el-select,.el-input{
width: 241px!important;
}
.edui-editor{
width: 100%;
}
</style>
\ No newline at end of file
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'>
<div class="base-info">基本信息</div>
<el-form-item label="原始标题:" prop="titleOld"> <el-form-item label="原始标题:" prop="titleOld">
<el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo" size="small"></el-input> <el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo" size="small"></el-input>
<p v-show="showInfo">{{dataForm.titleOld}}</p> <p v-show="showInfo">{{dataForm.titleOld}}</p>
...@@ -75,14 +75,11 @@ ...@@ -75,14 +75,11 @@
<div v-show="showInfo" v-html="dataForm.content"></div> <div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()'>重置</el-button> </span>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button> </el-dialog>
</span>
</div>
</div>
</template> </template>
<script> <script>
...@@ -94,7 +91,8 @@ ...@@ -94,7 +91,8 @@
data () { data () {
return { return {
loading: false, loading: false,
showInfo: this.$route.query.showInfo, visible: false,
showInfo: false,
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
...@@ -163,22 +161,16 @@ ...@@ -163,22 +161,16 @@
title: '' title: ''
} }
}, },
activated () {
if (this.$route.query.id) {
this.init(this.$route.query.id)
} else {
this.clearInp()
}
this.title = !this.$route.query.id ? '添加' : '修改'
},
created () { created () {
}, },
methods: { methods: {
init (id) { init (id, showInfo) {
this.loading = true
this.dataForm.id = id || 0 this.dataForm.id = id || 0
this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.clearInp()
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/news/info/${this.dataForm.id}`), url: this.$http.adornUrl(`/office/news/info/${this.dataForm.id}`),
...@@ -229,7 +221,8 @@ ...@@ -229,7 +221,8 @@
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'party-rules'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
...@@ -281,7 +274,7 @@ ...@@ -281,7 +274,7 @@
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.imgUrlStr = '' this.imgUrlStr = ''
this.dialogVisible = false this.dialogVisible = false
this.dataForm.content = '' this.ueditor.value = ''
}, },
// 更新父子组件内容 // 更新父子组件内容
editorReady (instance) { editorReady (instance) {
...@@ -293,17 +286,3 @@ ...@@ -293,17 +286,3 @@
} }
} }
</script> </script>
<style scoped>
.form-list{
padding-left: 4%!important;
}
.el-form-item__content{
width: 50%;
}
.el-select,.el-input{
width: 241px!important;
}
.edui-editor{
width: 100%;
}
</style>
\ No newline at end of file
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'>
<div class="base-info">基本信息</div>
<el-form-item label="原始标题:" prop="titleOld"> <el-form-item label="原始标题:" prop="titleOld">
<el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo" size="small"></el-input> <el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo" size="small"></el-input>
<p v-show="showInfo">{{dataForm.titleOld}}</p> <p v-show="showInfo">{{dataForm.titleOld}}</p>
...@@ -75,14 +75,11 @@ ...@@ -75,14 +75,11 @@
<div v-show="showInfo" v-html="dataForm.content"></div> <div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()'>重置</el-button> </span>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button> </el-dialog>
</span>
</div>
</div>
</template> </template>
<script> <script>
...@@ -94,7 +91,8 @@ ...@@ -94,7 +91,8 @@
data () { data () {
return { return {
loading: false, loading: false,
showInfo: this.$route.query.showInfo, visible: false,
showInfo: false,
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
...@@ -163,23 +161,16 @@ ...@@ -163,23 +161,16 @@
title: '' title: ''
} }
}, },
activated () {
if (this.$route.query.id) {
this.init(this.$route.query.id)
} else {
this.clearInp()
}
this.title = !this.$route.query.id ? '添加' : '修改'
},
created () { created () {
}, },
methods: { methods: {
init (id) { init (id, showInfo) {
this.loading = true
this.dataForm.id = id || 0 this.dataForm.id = id || 0
this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.clearInp()
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/news/info/${this.dataForm.id}`), url: this.$http.adornUrl(`/office/news/info/${this.dataForm.id}`),
...@@ -230,7 +221,8 @@ ...@@ -230,7 +221,8 @@
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'party-topicnews'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
...@@ -282,7 +274,7 @@ ...@@ -282,7 +274,7 @@
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.imgUrlStr = '' this.imgUrlStr = ''
this.dialogVisible = false this.dialogVisible = false
this.dataForm.content = '' this.ueditor.value = ''
}, },
// 更新父子组件内容 // 更新父子组件内容
editorReady (instance) { editorReady (instance) {
...@@ -294,17 +286,3 @@ ...@@ -294,17 +286,3 @@
} }
} }
</script> </script>
<style scoped>
.form-list{
padding-left: 4%!important;
}
.el-form-item__content{
width: 50%;
}
.el-select,.el-input{
width: 241px!important;
}
.edui-editor{
width: 100%;
}
</style>
\ No newline at end of file
<template> <template>
<div class="mod-config"> <el-dialog
<div class="title">{{title}}</div> :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
<div class="form-list"> :close-on-click-modal="false"
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px"> :visible.sync="visible">
<div class="base-info">基本信息</div> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="120px" v-loading='loading'>
<el-form-item label="原始标题:" prop="titleOld"> <el-form-item label="原始标题:" prop="titleOld">
<el-input v-model="dataForm.titleOld" placeholder="请输入显示标题" v-show="!showInfo" size="small"></el-input> <el-input v-model="dataForm.titleOld" placeholder="请输入显示标题" v-show="!showInfo" size="small"></el-input>
<p v-show="showInfo">{{dataForm.titleOld}}</p> <p v-show="showInfo">{{dataForm.titleOld}}</p>
...@@ -81,14 +81,11 @@ ...@@ -81,14 +81,11 @@
<div v-show="showInfo" v-html="dataForm.content"></div> <div v-show="showInfo" v-html="dataForm.content"></div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer" v-show="!showInfo">
<div class="sub-btn" v-show="!showInfo"> <el-button @click="visible = false">取消</el-button>
<span slot='footer' class='dialog-footer'> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button @click='clearInp()'>重置</el-button> </span>
<el-button type='primary' @click='dataFormSubmit()'>确定</el-button> </el-dialog>
</span>
</div>
</div>
</template> </template>
<script> <script>
...@@ -99,7 +96,9 @@ ...@@ -99,7 +96,9 @@
}, },
data () { data () {
return { return {
showInfo: this.$route.query.showInfo || false, loading: false,
visible: false,
showInfo: false,
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'label' label: 'label'
...@@ -176,25 +175,23 @@ ...@@ -176,25 +175,23 @@
title: '' title: ''
} }
}, },
activated () {
if (this.$route.query.id) {
this.init(this.$route.query.id)
}
this.title = !this.$route.query.id ? '新增' : '修改'
},
created () { created () {
}, },
methods: { methods: {
init (id) { init (id, showInfo) {
this.dataForm.id = id || 0 this.dataForm.id = id || 0
this.visible = true
this.showInfo = showInfo
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.clearInp()
if (this.dataForm.id) { if (this.dataForm.id) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/policy/info/${this.dataForm.id}`), url: this.$http.adornUrl(`/office/policy/info/${this.dataForm.id}`),
method: 'get', method: 'get',
params: this.$http.adornParams() params: this.$http.adornParams()
}).then(({data}) => { }).then(({data}) => {
this.loading = false
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm = data.policy this.dataForm = data.policy
this.dataForm.publicdate = data.policy.releasedate this.dataForm.publicdate = data.policy.releasedate
...@@ -214,6 +211,7 @@ ...@@ -214,6 +211,7 @@
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.$http({ this.$http({
...@@ -235,13 +233,15 @@ ...@@ -235,13 +233,15 @@
'startdate': this.dataForm.startdate 'startdate': this.dataForm.startdate
}) })
}).then(({data}) => { }).then(({data}) => {
this.loading = false
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$router.push({name: 'policy-policy'}) this.visible = false
this.$emit('refreshDataList')
} }
}) })
} else { } else {
...@@ -254,25 +254,9 @@ ...@@ -254,25 +254,9 @@
clearInp () { clearInp () {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
this.imgUrlStr = '' this.ueditor.value = ''
this.dialogVisible = false
this.dataForm.value = ''
} }
} }
} }
</script> </script>
<style scoped>
.form-list{
padding-left: 4%!important;
}
.el-form-item__content{
width: 50%;
}
.el-select,.el-input{
width: 241px!important;
}
.edui-editor{
width: 100%;
}
</style>
\ No newline at end of file
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
'searchreplace', // 查询替换 'searchreplace', // 查询替换
// 'map', // Baidu地图 // 'map', // Baidu地图
// 'gmap', // Google地图 // 'gmap', // Google地图
// 'insertvideo', // 视频 'insertvideo', // 视频
// 'help', // 帮助 // 'help', // 帮助
'justifyleft', // 居左对齐 'justifyleft', // 居左对齐
'justifyright', // 居右对齐 'justifyright', // 居右对齐
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment