Commit 6a59a6d7 authored by msgroup's avatar msgroup Committed by mingsoft
Browse files

fix: 5.3

parent 672d5545
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
:label="item.title" :name="item.name"> :label="item.title" :name="item.name">
<el-form v-if="item.title=='文章编辑'" ref="form" :model="form" :rules="rules" label-width="120px" <el-form v-if="item.title=='文章编辑'" ref="form" :model="form" :rules="rules" label-width="120px"
size="mini"> size="mini">
<el-row gutter="0" justify="start" align="top"> <el-row :gutter="0" justify="start" align="top">
<el-col :span="returnIsShow?'12':'24'"> <el-col :span="returnIsShow?'12':'24'">
<el-form-item label="文章标题" prop="contentTitle"> <el-form-item label="文章标题" prop="contentTitle">
<el-input v-model="form.contentTitle" <el-input v-model="form.contentTitle"
...@@ -65,6 +65,37 @@ ...@@ -65,6 +65,37 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row
gutter="0"
justify="start" align="top">
<el-col :span="returnIsShow?'12':'24'">
<el-form-item label="文章副标题" prop="contentShortTitle">
<el-input v-model="form.contentShortTitle"
:disabled="false"
:style="{width: '100%'}"
:clearable="true"
placeholder="请输入文章副标题">
</el-input>
<div class="ms-form-tip">
标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/wen-zhang-lie-biao-ms-arclist.html" target="_blank">${'$'}{field.shorttitle}</a>
</div>
</el-form-item>
</el-col>
<el-col span="12">
<el-form-item label="文章外链接" prop="contentOutLink">
<el-input v-model="form.contentOutLink"
:disabled="false"
:style="{width: '100%'}"
:clearable="true"
placeholder="请输入文章外链接">
</el-input>
<div class="ms-form-tip">
标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/wen-zhang-lie-biao-ms-arclist.html"
target="_blank">${'$'}{field.outlink}</a> 文章外链接必须以http或者https等开头
</div>
</el-form-item>
</el-col>
</el-row>
<el-row <el-row
gutter="0" gutter="0"
justify="start" align="top"> justify="start" align="top">
...@@ -138,24 +169,6 @@ ...@@ -138,24 +169,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row
gutter="0"
justify="start" align="top">
<el-col span="12">
<el-form-item label="文章外链接" prop="contentOutLink">
<el-input v-model="form.contentOutLink"
:disabled="false"
:style="{width: '100%'}"
:clearable="true"
placeholder="请输入文章外链接">
</el-input>
<div class="ms-form-tip">
标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/wen-zhang-lie-biao-ms-arclist.html"
target="_blank">${'$'}{field.outlink}</a> 文章外链接必须以http或者https等开头
</div>
</el-form-item>
</el-col>
</el-row>
<el-row <el-row
gutter="0" gutter="0"
justify="start" align="top"> justify="start" align="top">
...@@ -195,7 +208,7 @@ ...@@ -195,7 +208,7 @@
:action="ms.manager+'/file/upload.do'" :action="ms.manager+'/file/upload.do'"
:on-remove="contentImghandleRemove" :on-remove="contentImghandleRemove"
:style="{width:''}" :style="{width:''}"
:limit="1" :limit="10"
:on-exceed="contentImghandleExceed" :on-exceed="contentImghandleExceed"
:disabled="false" :disabled="false"
:data="{uploadPath:'/cms/content','isRename':true ,'appId':true}" :data="{uploadPath:'/cms/content','isRename':true ,'appId':true}"
...@@ -205,7 +218,7 @@ ...@@ -205,7 +218,7 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<div slot="tip" class="ms-form-tip"> <div slot="tip" class="ms-form-tip">
标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/wen-zhang-lie-biao-ms-arclist.html" target="_blank">${'{@ms:file field.litpic/}'}</a><br/> 标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/wen-zhang-lie-biao-ms-arclist.html" target="_blank">${'{@ms:file field.litpic/}'}</a><br/>
最多上传1张图片,文章缩略图,支持jpg格式 最多上传10张图片,文章缩略图,支持jpg格式;多图情况下,{@ms:file field.litpic/}会只取第一张缩略图,其他用法参考文档arclist标签
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
...@@ -270,6 +283,8 @@ ...@@ -270,6 +283,8 @@
form: { form: {
// 文章标题 // 文章标题
contentTitle: '', contentTitle: '',
// 文章副标题
contentShortTitle: '',
// 所属栏目 // 所属栏目
categoryId: undefined, categoryId: undefined,
// 文章类型 // 文章类型
...@@ -336,7 +351,11 @@ ...@@ -336,7 +351,11 @@
var _this = this; var _this = this;
var that = this; //自定义模型需要验证 var that = this; //自定义模型需要验证
if (this.model && !this.model.validate()) { var model = null;
if (that.currCategory.mdiyModelId && String(that.currCategory.mdiyModelId )!="0"){
model = ms.mdiy.model.modelForm();
}
if (model && !model.validate()) {
this.activeName = 'custom-name'; this.activeName = 'custom-name';
return; return;
} }
...@@ -347,7 +366,7 @@ ...@@ -347,7 +366,7 @@
} }
//若缩略图为空则赋值为空串 //若缩略图为空则赋值为空串
if (that.form.contentImg.length == 0){ if (that.form.contentImg.length == 0){
that.form.contentImg = ""; that.form.contentImg = [];
} }
this.$refs.form[0].validate(function (valid) { this.$refs.form[0].validate(function (valid) {
...@@ -367,9 +386,9 @@ ...@@ -367,9 +386,9 @@
ms.http.post(url, data).then(function (data) { ms.http.post(url, data).then(function (data) {
if (data.result) { if (data.result) {
//保存时需要赋值关联ID //保存时需要赋值关联ID
if (that.model) { if (model) {
that.model.form.linkId = data.data.id; model.form.linkId = data.data.id;
that.model.save(); model.save();
} }
that.$notify({ that.$notify({
title: '成功', title: '成功',
...@@ -589,7 +608,7 @@ ...@@ -589,7 +608,7 @@
contentImghandleExceed: function (files, fileList) { contentImghandleExceed: function (files, fileList) {
this.$notify({ this.$notify({
title: '失败', title: '失败',
message: '当前最多上传1个文件', message: '当前最多上传10个文件',
type: 'warning' type: 'warning'
}); });
}, },
......
...@@ -364,15 +364,18 @@ ...@@ -364,15 +364,18 @@
save: function (id) { save: function (id) {
//id有值时编辑 //id有值时编辑
if (id) { if (id) {
location.href = this.manager + "/cms/content/form.do?id=" + id; // location.href = this.manager + "/cms/content/form.do?id=" + id;
ms.util.openSystemUrl("/cms/content/form.do?id=" + id);
}else { }else {
//根据当前栏目新增时自动选中栏目 //根据当前栏目新增时自动选中栏目
var categoryId = this.form.categoryId; var categoryId = this.form.categoryId;
if (categoryId) { if (categoryId) {
location.href = this.manager + "/cms/content/form.do?categoryId=" + this.form.categoryId; // location.href = this.manager + "/cms/content/form.do?categoryId=" + this.form.categoryId;
ms.util.openSystemUrl("/cms/content/form.do?categoryId=" + this.form.categoryId);
}else { }else {
//如果栏目id没有值就单纯的新增,不自动选定栏目 //如果栏目id没有值就单纯的新增,不自动选定栏目
location.href = this.manager + "/cms/content/form.do"; // location.href = this.manager + "/cms/content/form.do";
ms.util.openSystemUrl("/cms/content/form.do");
} }
} }
}, },
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
</style> </style>
</head> </head>
<body class="custom-body"> <body class="custom-body">
<div id="app" v-cloak> <div id="app" class="ms-index" v-cloak>
<el-form ref="form" label-width="100px" size="mini"> <el-form ref="form" label-width="100px" size="mini">
<div class="class-2" > <div class="class-2" >
<div class="class-3" > <div class="class-3 panel" >
<div class="class-4" > <div class="class-4" >
<el-form-item label="主页模板" > <el-form-item label="主页模板" >
<el-select v-model="template" <el-select v-model="template"
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
:label="item"></el-option> :label="item"></el-option>
</el-select> </el-select>
<div class="ms-form-tip"> <div class="ms-form-tip">
一般选择<i>index.htm</i>模 一般选择<i>index.htm</i>模
</div> </div>
</el-form-item> </el-form-item>
</div> </div>
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
</el-input> </el-input>
<div class="ms-form-tip"> <div class="ms-form-tip">
一般为index.html或default.html, 一般为index.html或default.html,
如果是<i>引导页面->首页</i>,可以手动调整主页模与主页设置,先生成引导页,再生成首页。一般default.html为引导页面index.html为主页(需要服务器容器配置好对应默认页)。<br/> 如果是<i>引导页面->首页</i>,可以手动调整主页模与主页设置,先生成引导页,再生成首页。一般default.html为引导页面index.html为主页(需要服务器容器配置好对应默认页)。<br/>
点击“预览主页”可跳转到网站首页进行预览网站首页<br/> 点击“预览主页”可跳转到网站首页进行预览网站首页<br/>
不能选择有分页标签的页面生成,例如news-list.htm、search.htm<br/> 不能选择有分页标签的页面生成,例如news-list.htm、search.htm<br/>
如果下拉没有出现模,请检查应用设置是否绑定了模<br/> 如果下拉没有出现模,请检查应用设置是否绑定了模<br/>
</div> </div>
</el-form-item> </el-form-item>
</div> </div>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
<div class="class-13" > <div class="class-13 panel" >
<div class="class-14" > <div class="class-14" >
<el-form-item label="文章栏目"> <el-form-item label="文章栏目">
<ms-tree-select v-model="contentSection" <ms-tree-select v-model="contentSection"
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
</div> </div>
</div> </div>
<div class="class-23" > <div class="class-23 panel" >
<div class="class-24" > <div class="class-24" >
<el-form-item label="生成栏目"> <el-form-item label="生成栏目">
<ms-tree-select v-model="section" <ms-tree-select v-model="section"
...@@ -276,6 +276,14 @@ ...@@ -276,6 +276,14 @@
}); });
</script> </script>
<style> <style>
#app {
background-color: white;
}
#app .panel {
background-color: white;
padding: 20px 40px 20px 40px;
border: 1px solid #EBEEF5;
}
input{ input{
width: 100%!important; width: 100%!important;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Supports Markdown
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