diff --git a/src/api/index.js b/src/api/index.js
index 2176924..61aef9c 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -113,6 +113,7 @@ export default {
categoryFind: `/iasf/categoryService/Category/findById`,
categoryList: `/iasf/categoryService/Category/list`,
categorySave: `/iasf/categoryService/Category/saveOrUpdate`,
+ categoryCheck: `/iasf/categoryService/Category/checkDelete`,
productDetailsSave: `/iasf/productDetails/saveOrUpdate`,
productDetailsFind: `/iasf/productDetails/findById`,
diff --git a/src/components/modules/link.vue b/src/components/modules/link.vue
index 82e2f06..c8a1110 100644
--- a/src/components/modules/link.vue
+++ b/src/components/modules/link.vue
@@ -1,16 +1,9 @@
-
-
-
+
+
+
站内链接
@@ -20,71 +13,45 @@
-
+
-
+
-
-
+
+
-
-
-
+
+
+
-
+
-
+
-
-
+
+
-
@@ -133,8 +100,6 @@ export default {
// 栏目列表
getList () {
this.$post(this.api.listWithTree, {
-
-
siteId: this.site.id,
columnName: '',
templateId: '',
@@ -154,13 +119,16 @@ export default {
},
// 栏目选择回调
columnChange () {
- this.data.articleId = ''
+ this.data[this.data.connectionType === 1 ? 'articleId' : 'otherArticleId'] = ''
this.getArticle()
},
// 文章列表
getArticle () {
// 站内链接/其他站点链接
- const id = this.data.connectionType === 1 ? this.data.columnId[this.data.columnId.length - 1] : this.data.otherColumnId[this.data.otherColumnId.length - 1]
+ const isIn = this.data.connectionType === 1 // 站内
+ const id = isIn ? this.data.columnId[this.data.columnId.length - 1] : this.data.otherColumnId[this.data.otherColumnId.length - 1]
+ const e = this[isIn ? 'columns' : 'otherColumns'].find(e => e.id === id)
+ e && this.$set(this.data, 'isProduct', e.templateId === 12 || e.listStyleId === 73 ? 1 : 0)
id && this.$post(this.api.queryArticle, {
siteId: this.data.connectionType === 1 ? this.site.id : this.data.site,
columnIds: [id],
@@ -185,8 +153,6 @@ export default {
// 获取指定站点的栏目列表
getOtherColumn () {
this.data.site && this.$post(this.api.listWithTree, {
-
-
siteId: this.data.site,
columnName: '',
templateId: '',
@@ -206,5 +172,4 @@ export default {
}
};
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/components/modules/module.vue b/src/components/modules/module.vue
index 5cd1d9f..1566d39 100644
--- a/src/components/modules/module.vue
+++ b/src/components/modules/module.vue
@@ -22,7 +22,12 @@
-
+
+
+ {{ scope.row[item.pureProp] }}
+
+
+
@@ -264,7 +269,7 @@ export default {
]),
// 处理form表单参数
handleForm () {
- const { type, forms, form, dialogWidth, labelWidth } = this.data
+ const { type, forms, form, dialogWidth, labelWidth, list } = this.data
if (!this.data.labelWidth) this.data.labelWidth = '70px'
this.fixed = false
if (type === 'form' || type === 'forms') {
@@ -310,6 +315,18 @@ export default {
}
this.articleNums = nums
}
+ if (type === 'introduce') {
+ forms.map(e => {
+ if (e.type === 'editor' && e.pureText && list) {
+ list.map(n => {
+ console.log(444, n[e.prop])
+ const el = document.createElement('div')
+ el.innerHTML = n[e.prop]
+ n[e.pureProp] = el.innerText
+ })
+ }
+ })
+ }
form && form.site && this.siteChange(form.site)
this.dialogWidth = dialogWidth || '1000px'
if (labelWidth) this.labelWidth = labelWidth
@@ -420,9 +437,13 @@ export default {
this.$set(row, item.type === 'video' ? 'video' : 'pic', res.url)
this.$set(row, 'mediaType', res.original.substr(res.original.lastIndexOf('.') + 1))
this.$set(row, 'fileName', res.original)
+ this.fileList = [{
+ name: res.original,
+ url: res.url
+ }]
}
},
- beforeRemove (file, fileList) {
+ beforeRemove (file) {
return this.$confirm(`确定移除 ${file.name}?`);
},
handleRemove (file, fileList, form, prop) {
diff --git a/src/const/modules.js b/src/const/modules.js
index 0efab78..7c229e3 100644
--- a/src/const/modules.js
+++ b/src/const/modules.js
@@ -461,7 +461,9 @@ export default {
{
type: 'editor',
prop: 'des',
- label: '描述'
+ label: '描述',
+ pureText: true, // 编辑的时候是富文本,但是外面表格里展示的时候是纯文本(富文本里文字图片过大影响表格展示才需要用此方式)
+ pureProp: 'pureDes', // 跟pureText绑定的属性,有pureText才会有此字段,用以表格里展示纯文本
},
{
type: 'link',
diff --git a/src/pages/article/add/product.vue b/src/pages/article/add/product.vue
index 437212d..e2a10ab 100644
--- a/src/pages/article/add/product.vue
+++ b/src/pages/article/add/product.vue
@@ -652,9 +652,10 @@ export default {
this.$set(row, 'edit', 1)
},
// 删除分类
- delClass (row, i) {
+ async delClass (row, i) {
if (row.categoryId) {
- this.$confirm('确定要删除吗?', '提示', {
+ const { code, msg } = await this.$post(`${this.api.categoryCheck}?categoryId=${row.categoryId}`)
+ this.$confirm(code === 200 ? '确定要删除吗?' : msg, '提示', {
type: 'warning'
}).then(() => {
this.$post(this.api.categoryDel, [row.categoryId]).then(res => {
@@ -731,9 +732,10 @@ export default {
this.$set(row, 'edit', 1)
},
// 删除类型
- delLabel (row, i) {
+ async delLabel (row, i) {
if (row.categoryId) {
- this.$confirm('确定要删除吗?', '提示', {
+ const { code, msg } = await this.$post(`${this.api.categoryCheck}?categoryId=${row.categoryId}`)
+ this.$confirm(code === 200 ? '确定要删除吗?' : msg, '提示', {
type: 'warning'
}).then(() => {
this.$post(this.api.categoryDel, [row.categoryId]).then(res => {
diff --git a/src/pages/column/add/index.vue b/src/pages/column/add/index.vue
index 797d4bd..8ab8d82 100644
--- a/src/pages/column/add/index.vue
+++ b/src/pages/column/add/index.vue
@@ -55,8 +55,10 @@
-
-
+
+
{{ item.style }}
@@ -66,8 +68,10 @@
-
-
+
+
{{ item.style }}
@@ -131,7 +135,10 @@
-
-
+
+
+
{{ item.style }}
diff --git a/src/pages/logo/index.vue b/src/pages/logo/index.vue
index cf06497..ee22e1d 100644
--- a/src/pages/logo/index.vue
+++ b/src/pages/logo/index.vue
@@ -5,8 +5,9 @@
-
+
上传logo
@@ -15,7 +16,7 @@
-
只能上传jpg/png文件,请上传120*40左右的logo
+
只能上传jpg/png/svg文件,请上传120*40左右的logo
@@ -37,7 +38,6 @@ export default {
token: Util.local.get(Setting.tokenKey)
},
coverUrl: '',
- uploadList: [],
form: {
id: '',
title: '',
diff --git a/src/pages/nav/index.vue b/src/pages/nav/index.vue
index 1334c7d..ff3fb52 100644
--- a/src/pages/nav/index.vue
+++ b/src/pages/nav/index.vue
@@ -53,7 +53,7 @@
-
@@ -87,7 +87,7 @@
-
@@ -196,10 +196,7 @@ export default {
},
methods: {
getData () {
- this.$post(`${this.api.navList}?siteId=${this.siteId}`, {
- siteId: this.siteId,
- search: this.keyword,
- }).then(({ data }) => {
+ this.$post(`${this.api.navList}?siteId=${this.siteId}&search=${this.keyword}`).then(({ data }) => {
this.list = data
this.listLoading = false
}).catch(err => {
@@ -344,7 +341,8 @@ export default {
const result = this.sortColumns.map((e, i) => {
return {
id: e.id,
- sortOrder: i + 1
+ sortOrder: i + 1,
+ icon: e.icon,
}
})
await this.$post(this.api.navSort, result)
diff --git a/src/pages/seo/index.vue b/src/pages/seo/index.vue
index c8636c1..31fdec2 100644
--- a/src/pages/seo/index.vue
+++ b/src/pages/seo/index.vue
@@ -11,6 +11,22 @@
+
+
+
+
上传图标
+
+
+
+
+
+
+
只能上传ico/jpg/png/svg文件,请上传16*16或者32*32大小的图标
+
+
+
保存
@@ -19,15 +35,22 @@