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

fix: 5.3

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