fix:待发布版本

master
msgroup 3 years ago committed by mingsoft
parent bb7b7a5277
commit 3dfe9c6901
  1. 50
      src/main/webapp/WEB-INF/manager/cms/category/index.ftl

@ -6,14 +6,16 @@
<script src="${base}/static/plugins/clipboard/clipboard.js"></script>
</head>
<body>
<div id="index" class="ms-index" v-cloak>
<div id="index" class="ms-index" v-cloak>
<el-header class="ms-header" height="50px">
<el-col :span="12">
<@shiro.hasPermission name="cms:category:save">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="save()">新增</el-button>
</@shiro.hasPermission>
<@shiro.hasPermission name="cms:category:del">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="del(selectionList)" :disabled="!selectionList.length">删除</el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="del(selectionList)"
:disabled="!selectionList.length">删除
</el-button>
</@shiro.hasPermission>
</el-col>
</el-header>
@ -33,13 +35,15 @@
<el-table-column type="selection" width="40"></el-table-column>
<el-table-column label="编号" width="100" prop="id" show-overflow-tooltip>
<template slot='header'>编号
<el-popover placement="top-start" title="提示" trigger="hover" >
标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/lan-mu-lie-biao-ms-channel.html" target="_blank">${'$'}{field.id}</a>
<el-popover placement="top-start" title="提示" trigger="hover">
标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/lan-mu-lie-biao-ms-channel.html"
target="_blank">${'$'}{field.id}</a>
<i class="el-icon-question" slot="reference"></i>
</el-popover>
</template>
<template slot-scope="scope">
<span style="cursor: pointer" class="copyBtn" :data-clipboard-text="scope.row.id" @click="copyContent(true)">{{scope.row.id}}</span>
<span style="cursor: pointer" class="copyBtn" :data-clipboard-text="scope.row.id"
@click="copyContent(true)">{{scope.row.id}}</span>
</template>
</el-table-column>
<el-table-column label="标题" align="left" prop="categoryTitle">
@ -50,8 +54,11 @@
</el-table-column>
<el-table-column label="链接地址" align="left" prop="categoryPath" min-width="200" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.categoryType == '1' || scope.row.categoryType == '2'" 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 v-if="scope.row.categoryType == '3'" style="cursor: pointer" class="copyBtn" :data-clipboard-text="scope.row.categoryDiyUrl" @click="copyContent">{{scope.row.categoryDiyUrl}}</span>
<span v-if="scope.row.categoryType == '1' || scope.row.categoryType == '2'" style="cursor: pointer"
class="copyBtn" :data-clipboard-text="'{ms:global.url/}'+scope.row.url"
@click="copyContent">{{"{ms:global.url/}"+scope.row.url}}</span>
<span v-if="scope.row.categoryType == '3'" style="cursor: pointer" class="copyBtn"
:data-clipboard-text="scope.row.categoryDiyUrl" @click="copyContent">{{scope.row.categoryDiyUrl}}</span>
</template>
</el-table-column>
<el-table-column label="列表地址" align="left" prop="categoryListUrl" width="100" show-overflow-tooltip>
@ -62,22 +69,25 @@
{{scope.row.categoryType == '2'?scope.row.categoryUrl:''}}
</template>
</el-table-column>
<el-table-column label="栏目属性" align="left" prop="categoryFlag" width="100" show-overflow-tooltip>
<el-table-column label="栏目属性" align="left" prop="categoryFlag" width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{getDictLabel(scope.row.categoryFlag)}}
</template>
</el-table-column>
<el-table-column label="操作" width="180" align="center">
<el-table-column label="操作" width="240" align="center">
<template slot-scope="scope">
<el-link type="primary" :underline="false" v-if="scope.row.categoryType != '3'" @click="preview(scope.row)">预览</el-link>
<@shiro.hasPermission name="cms:category:save">
<el-link type="primary" :underline="false" @click="save(scope.row.id, scope.row.id)"><i class="el-icon-plus"></i>子栏目</el-link>
<el-link type="primary" :underline="false" @click="save(scope.row.id, scope.row.id)"><i
class="el-icon-plus"></i>子栏目
</el-link>
</@shiro.hasPermission>
<@shiro.hasPermission name="cms:category:save">
<el-link type="primary" :underline="false" @click="copyCategory(scope.row.id)">克隆</el-link>
</@shiro.hasPermission>
<#-- <@shiro.hasPermission name="cms:category:update">-->
<#-- <el-link type="primary" :underline="false" v-if="scope.row.categoryType == '1' || scope.row.categoryType == '2'" @click="updateTemplate(scope.row.id)">应用子栏目</el-link>-->
<#-- </@shiro.hasPermission>-->
<#-- <el-link type="primary" :underline="false" v-if="scope.row.categoryType == '1' || scope.row.categoryType == '2'" @click="updateTemplate(scope.row.id)">应用子栏目</el-link>-->
<#-- </@shiro.hasPermission>-->
<@shiro.hasPermission name="cms:category:update">
<el-link type="primary" :underline="false" @click="save(scope.row.id)">编辑</el-link>
</@shiro.hasPermission>
@ -88,7 +98,7 @@
</el-table-column>
</el-table>
</el-main>
</div>
</div>
</body>
</html>
@ -115,7 +125,7 @@
}, {
"value": "2",
"label": "封面"
},{
}, {
"value": "3",
"label": "链接"
}],
@ -147,7 +157,7 @@
},
methods: {
//复制栏目
copyCategory: function(id) {
copyCategory: function (id) {
var that = this;
ms.http.get(ms.manager + "/cms/category/copyCategory.do", {
id: id
@ -169,7 +179,7 @@
});
},
//应用子栏目模板
updateTemplate: function(id) {
updateTemplate: function (id) {
var that = this;
ms.http.get(ms.manager + "/cms/category/updateTemplate.do", {
id: id
@ -194,7 +204,7 @@
getDictLabel: function (v) {
var that = this;
var labels = [];
if(v){
if (v) {
v.split(",").forEach(function (item) {
for (var key in that.categoryFlagOptions) {
if (item == that.categoryFlagOptions[key].dictValue) {
@ -287,6 +297,10 @@
});
})
},
//预览栏目
preview: function (row) {
window.open(row["url"]);
},
//获取categoryFlag数据源
categoryFlagOptionsGet: function () {
var that = this;
@ -294,7 +308,7 @@
dictType: '栏目属性',
pageSize: 99999
}).then(function (res) {
if(res.result){
if (res.result) {
res = res.data;
that.categoryFlagOptions = res.rows;
}

Loading…
Cancel
Save