Commit 76f51f9d by Lyan

页面样式更改

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