|
@@ -31,13 +31,16 @@
|
|
|
{{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">
|
|
|
|
|
|
|
+ <el-table-column label="编号" width="220" 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>
|
|
|
<i class="el-icon-question" slot="reference"></i>
|
|
<i class="el-icon-question" slot="reference"></i>
|
|
|
</el-popover>
|
|
</el-popover>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <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>
|
|
|
<el-table-column label="标题" align="left" prop="categoryTitle">
|
|
<el-table-column label="标题" align="left" prop="categoryTitle">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -47,7 +50,7 @@
|
|
|
</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" 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="copyUrl">{{"{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" show-overflow-tooltip>
|
|
@@ -62,6 +65,11 @@
|
|
|
{{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>
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ {{getDictLabel(scope.row.categoryFlag)}}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" width="150" align="center">
|
|
<el-table-column label="操作" width="150" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<@shiro.hasPermission name="cms:category:save">
|
|
<@shiro.hasPermission name="cms:category:save">
|
|
@@ -95,6 +103,7 @@
|
|
|
//加载状态
|
|
//加载状态
|
|
|
emptyText: '',
|
|
emptyText: '',
|
|
|
//提示文字
|
|
//提示文字
|
|
|
|
|
+ categoryFlagOptions: [],
|
|
|
manager: ms.manager,
|
|
manager: ms.manager,
|
|
|
loadState: false,
|
|
loadState: false,
|
|
|
categoryTypeOptions: [{
|
|
categoryTypeOptions: [{
|
|
@@ -134,6 +143,21 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ //根据字典数据值获取字典标签名
|
|
|
|
|
+ getDictLabel: function (v) {
|
|
|
|
|
+ var that = this;
|
|
|
|
|
+ v = v.split(",");
|
|
|
|
|
+ var labels = [];
|
|
|
|
|
+ v.forEach(function (item) {
|
|
|
|
|
+ for (var key in that.categoryFlagOptions) {
|
|
|
|
|
+ if (item == that.categoryFlagOptions[key].dictValue) {
|
|
|
|
|
+ labels.push(that.categoryFlagOptions[key].dictLabel);
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return labels.toString();
|
|
|
|
|
+ },
|
|
|
//查询列表
|
|
//查询列表
|
|
|
list: function () {
|
|
list: function () {
|
|
|
var that = this;
|
|
var that = this;
|
|
@@ -166,13 +190,17 @@
|
|
|
}
|
|
}
|
|
|
}, 500);
|
|
}, 500);
|
|
|
},
|
|
},
|
|
|
- copyUrl: function () {
|
|
|
|
|
|
|
+ copyContent: function (id) {
|
|
|
|
|
+ var msg = "链接地址已保存到剪切板";
|
|
|
|
|
+ if (id == true) {
|
|
|
|
|
+ msg = "编号已保存到剪切板";
|
|
|
|
|
+ }
|
|
|
var clipboard = new ClipboardJS('.copyBtn');
|
|
var clipboard = new ClipboardJS('.copyBtn');
|
|
|
var self = this;
|
|
var self = this;
|
|
|
clipboard.on('success', function (e) {
|
|
clipboard.on('success', function (e) {
|
|
|
self.$notify({
|
|
self.$notify({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
|
- message: "链接地址已保存到剪切板",
|
|
|
|
|
|
|
+ message: msg,
|
|
|
type: 'success'
|
|
type: 'success'
|
|
|
});
|
|
});
|
|
|
clipboard.destroy();
|
|
clipboard.destroy();
|
|
@@ -217,6 +245,21 @@
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ //获取categoryFlag数据源
|
|
|
|
|
+ categoryFlagOptionsGet: function () {
|
|
|
|
|
+ var that = this;
|
|
|
|
|
+ ms.http.get(ms.base + '/mdiy/dict/list.do', {
|
|
|
|
|
+ dictType: '栏目属性',
|
|
|
|
|
+ pageSize: 99999
|
|
|
|
|
+ }).then(function (res) {
|
|
|
|
|
+ if(res.result){
|
|
|
|
|
+ res = res.data;
|
|
|
|
|
+ that.categoryFlagOptions = res.rows;
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(function (err) {
|
|
|
|
|
+ console.log(err);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
//表格数据转换
|
|
//表格数据转换
|
|
|
categoryTypeFormat: function (row, column, cellValue, index) {
|
|
categoryTypeFormat: function (row, column, cellValue, index) {
|
|
|
var value = "";
|
|
var value = "";
|
|
@@ -249,6 +292,7 @@
|
|
|
created: function () {
|
|
created: function () {
|
|
|
/* this.categoryListUrlOptionsGet();
|
|
/* this.categoryListUrlOptionsGet();
|
|
|
this.categoryUrlOptionsGet();*/
|
|
this.categoryUrlOptionsGet();*/
|
|
|
|
|
+ this.categoryFlagOptionsGet();
|
|
|
this.list();
|
|
this.list();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|