This commit is contained in:
xierz 2020-11-19 18:55:02 +08:00
parent 1e6a055a29
commit 450c72bca5
3 changed files with 23 additions and 32 deletions

View File

@ -334,7 +334,7 @@
validator: validatorCategoryPinyin, trigger: 'blur' validator: validatorCategoryPinyin, trigger: 'blur'
}, { }, {
"pattern": /^[^[!@#$"'%^&*()_+-/~?@#¥%…&*()——+—?》《:“‘’]+$/, "pattern": /^[^[!@#$"'%^&*()_+-/~?@#¥%…&*()——+—?》《:“‘’]+$/,
"message": "栏目管理名称格式不匹配" "message": "拼音格式不匹配"
}], }],
// 内容模板 // 内容模板
categoryUrl: [{ categoryUrl: [{
@ -375,23 +375,17 @@
}, },
'form.categoryTitle': function (n) { 'form.categoryTitle': function (n) {
var regu = "[[!@'\"#$%^&*()_+-/~?@#¥%…&*()——+—?》《:“‘’]"; var regu = "[[!@'\"#$%^&*()_+-/~?@#¥%…&*()——+—?》《:“‘’]";
if (this.regularCheck(regu, n)) {
this.rules.categoryPinyin = [{ this.rules.categoryPinyin = [{
"validator": this.validatorCategoryPinyin, trigger: 'blur' "validator": this.validatorCategoryPinyin, trigger: 'blur'
},{ }, {
"pattern": /^[^[!@#$"'%^&*()_+-/~?@#¥%…&*()——+—?》《:“‘’]+$/,
"message": "拼音格式不匹配"
}];
if (this.regularCheck(regu, n)) {
this.rules.categoryPinyin.push({
"required": true, "required": true,
"message": "请输入栏目拼音名称" "message": "请输入栏目拼音名称"
}, { });
"pattern": /^[^[!@#$"'%^&*()_+-/~?@#¥%…&*()——+—?》《:“‘’]+$/,
"message": "栏目管理名称格式不匹配"
}];
}else {
this.rules.categoryPinyin = [{
"validator": this.validatorCategoryPinyin, trigger: 'blur'
}, {
"pattern": /^[^[!@#$"'%^&*()_+-/~?@#¥%…&*()——+—?》《:“‘’]+$/,
"message": "栏目管理名称格式不匹配"
}];
} }
}, },
}, },
@ -427,7 +421,6 @@
if (that.form.id > 0) { if (that.form.id > 0) {
url = ms.manager + "/cms/category/update.do"; url = ms.manager + "/cms/category/update.do";
} }
console.log("aaa")
this.$refs.form.validate(function (valid) { this.$refs.form.validate(function (valid) {
if (valid) { if (valid) {
//栏目属性为封面则不需要列表模板 //栏目属性为封面则不需要列表模板

View File

@ -31,7 +31,7 @@
{{emptyText}} {{emptyText}}
</template> </template>
<el-table-column type="selection" width="40"></el-table-column> <el-table-column type="selection" width="40"></el-table-column>
<el-table-column label="编号" width="220" prop="id" show-overflow-tooltip> <el-table-column label="编号" width="100" prop="id" show-overflow-tooltip>
<template slot='header'>编号 <template slot='header'>编号
<el-popover placement="top-start" title="提示" trigger="hover" > <el-popover placement="top-start" title="提示" trigger="hover" >
<a href="http://doc.mingsoft.net/plugs-cms/biao-qian/lan-mu-lie-biao-ms-channel.html" target="_blank">${'$'}{field.id}</a> <a href="http://doc.mingsoft.net/plugs-cms/biao-qian/lan-mu-lie-biao-ms-channel.html" target="_blank">${'$'}{field.id}</a>
@ -48,24 +48,24 @@
</el-table-column> </el-table-column>
<el-table-column label="排序" align="center" prop="categorySort" width="70"> <el-table-column label="排序" align="center" prop="categorySort" width="70">
</el-table-column> </el-table-column>
<el-table-column label="链接地址" align="left" prop="categoryPath" show-overflow-tooltip> <el-table-column label="链接地址" align="left" prop="categoryPath" min-width="200" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span style="cursor: pointer" class="copyBtn" :data-clipboard-text="'${'$'}{ms:global.url}'+scope.row.categoryPath+'/index.html'" @click="copyContent">{{"{ms:global.url/}"+scope.row.categoryPath+"/index.html"}}</span> <span style="cursor: pointer" class="copyBtn" :data-clipboard-text="'{ms:global.url/}'+scope.row.categoryPath+'/index.html'" @click="copyContent">{{"{ms:global.url/}"+scope.row.categoryPath+"/index.html"}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="列表地址" align="left" prop="categoryListUrl" show-overflow-tooltip> <el-table-column label="列表地址" align="left" prop="categoryListUrl" width="100" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="内容地址" align="left" prop="categoryUrl" show-overflow-tooltip> <el-table-column label="内容地址" align="left" prop="categoryUrl" width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.categoryType == '1'?scope.row.categoryUrl:''}} {{scope.row.categoryType == '1'?scope.row.categoryUrl:''}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="封面地址" align="left" prop="categoryUrl" show-overflow-tooltip> <el-table-column label="封面地址" align="left" prop="categoryUrl" width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.categoryType == '2'?scope.row.categoryUrl:''}} {{scope.row.categoryType == '2'?scope.row.categoryUrl:''}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="栏目属性" align="left" prop="categoryFlag" show-overflow-tooltip> <el-table-column label="栏目属性" align="left" prop="categoryFlag" width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{getDictLabel(scope.row.categoryFlag)}} {{getDictLabel(scope.row.categoryFlag)}}
</template> </template>
@ -95,14 +95,14 @@
var indexVue = new Vue({ var indexVue = new Vue({
el: '#index', el: '#index',
data: { data: {
dataList: [],
//分类列表 //分类列表
selectionList: [], dataList: [],
//分类列表选中 //分类列表选中
loading: true, selectionList: [],
//加载状态 //加载状态
emptyText: '', loading: true,
//提示文字 //提示文字
emptyText: '',
categoryFlagOptions: [], categoryFlagOptions: [],
manager: ms.manager, manager: ms.manager,
loadState: false, loadState: false,
@ -146,9 +146,8 @@
//根据字典数据值获取字典标签名 //根据字典数据值获取字典标签名
getDictLabel: function (v) { getDictLabel: function (v) {
var that = this; var that = this;
v = v.split(",");
var labels = []; var labels = [];
v.forEach(function (item) { v.split(",").forEach(function (item) {
for (var key in that.categoryFlagOptions) { for (var key in that.categoryFlagOptions) {
if (item == that.categoryFlagOptions[key].dictValue) { if (item == that.categoryFlagOptions[key].dictValue) {
labels.push(that.categoryFlagOptions[key].dictLabel); labels.push(that.categoryFlagOptions[key].dictLabel);

View File

@ -91,7 +91,6 @@
start-placeholder="" start-placeholder=""
end-placeholder="" end-placeholder=""
:readonly="false" :readonly="false"
:disabled="false" :disabled="false"
:editable="true" :editable="true"
:clearable="true" :clearable="true"
@ -259,8 +258,8 @@
return { return {
saveDisabled: false, saveDisabled: false,
activeName: 'form', activeName: 'form',
model: undefined,
//自定义模型实例 //自定义模型实例
model: undefined,
editableTabs: [{ editableTabs: [{
title: '文章编辑', title: '文章编辑',
name: 'form' name: 'form'
@ -612,7 +611,7 @@
this.contentTypeOptionsGet(); this.contentTypeOptionsGet();
this.form.id = ms.util.getParameter("id"); this.form.id = ms.util.getParameter("id");
if (ms.util.getParameter("categoryId") != 'undefined' && ms.util.getParameter("categoryId") != 'null') { if (ms.util.getParameter("categoryId")) {
this.form.contentCategoryId = ms.util.getParameter("categoryId"); this.form.contentCategoryId = ms.util.getParameter("categoryId");
} }
this.type = ms.util.getParameter("type"); this.type = ms.util.getParameter("type");