yujialong 2 years ago
parent 5c890e6b61
commit d794b179f0
  1. BIN
      public/default.png
  2. 5
      public/editor.css
  3. 412
      public/tinymce/langs/zh_CN.js
  4. BIN
      src/assets/images/about/6.png
  5. BIN
      src/assets/images/about/7.png
  6. BIN
      src/assets/images/about/8.png
  7. 13
      src/components/editor.js
  8. 25
      src/pages/article/add/editor.js
  9. 20
      src/pages/article/add/index.vue
  10. 4
      src/pages/column/add/index.vue
  11. 8
      src/pages/user/list/index.vue
  12. 2
      src/setting.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

@ -46,6 +46,7 @@
} }
.tiny-wrap .quote { .tiny-wrap .quote {
padding: 15px; padding: 15px;
margin-bottom: 10px;
font-size: 16px; font-size: 16px;
font-style: italic; font-style: italic;
border: 1px solid #e3e3e3; border: 1px solid #e3e3e3;
@ -64,3 +65,7 @@
color: #8d8d8d; color: #8d8d8d;
text-align: center; text-align: center;
} }
.tiny-wrap .block .pic {
width: 300px;
height: 190px;
}

@ -0,0 +1,412 @@
/*!
* TinyMCE Language Pack
*
* Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc.
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
*/
tinymce.addI18n('zh-Hans', {
"Redo": "重做",
"Undo": "撤销",
"Cut": "剪切",
"Copy": "复制",
"Paste": "粘贴",
"Select all": "全选",
"New document": "新建文档",
"Ok": "确定",
"Cancel": "取消",
"Visual aids": "网格线",
"Bold": "粗体",
"Italic": "斜体",
"Underline": "下划线",
"Strikethrough": "删除线",
"Superscript": "上标",
"Subscript": "下标",
"Clear formatting": "清除格式",
"Remove": "移除",
"Align left": "左对齐",
"Align center": "居中对齐",
"Align right": "右对齐",
"No alignment": "未对齐",
"Justify": "两端对齐",
"Bullet list": "无序列表",
"Numbered list": "有序列表",
"Decrease indent": "减少缩进",
"Increase indent": "增加缩进",
"Close": "关闭",
"Formats": "格式",
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.": "你的浏览器不支持打开剪贴板,请使用Ctrl+X/C/V等快捷键。",
"Headings": "标题",
"Heading 1": "一级标题",
"Heading 2": "二级标题",
"Heading 3": "三级标题",
"Heading 4": "四级标题",
"Heading 5": "五级标题",
"Heading 6": "六级标题",
"Preformatted": "预先格式化的",
"Div": "Div",
"Pre": "前言",
"Code": "代码",
"Paragraph": "段落",
"Blockquote": "引文区块",
"Inline": "文本",
"Blocks": "样式",
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "当前为纯文本粘贴模式,再次点击可以回到普通粘贴模式。",
"Fonts": "字体",
"Font sizes": "字体大小",
"Class": "类型",
"Browse for an image": "浏览图像",
"OR": "或",
"Drop an image here": "拖放一张图像至此",
"Upload": "上传",
"Uploading image": "上传图片",
"Block": "块",
"Align": "对齐",
"Default": "预设",
"Circle": "空心圆",
"Disc": "实心圆",
"Square": "实心方块",
"Lower Alpha": "小写英文字母",
"Lower Greek": "小写希腊字母",
"Lower Roman": "小写罗马数字",
"Upper Alpha": "大写英文字母",
"Upper Roman": "大写罗马数字",
"Anchor...": "锚点...",
"Anchor": "锚点",
"Name": "名称",
"ID": "ID",
"ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.": "ID应该以英文字母开头,后面只能有英文字母、数字、破折号、点、冒号或下划线。",
"You have unsaved changes are you sure you want to navigate away?": "你还有文档尚未保存,确定要离开?",
"Restore last draft": "恢复上次的草稿",
"Special character...": "特殊字符...",
"Special Character": "特殊字符",
"Source code": "源代码",
"Insert/Edit code sample": "插入/编辑代码示例",
"Language": "语言",
"Code sample...": "示例代码...",
"Left to right": "由左到右",
"Right to left": "由右到左",
"Title": "标题",
"Fullscreen": "全屏",
"Action": "动作",
"Shortcut": "快捷方式",
"Help": "帮助",
"Address": "地址",
"Focus to menubar": "移动焦点到菜单栏",
"Focus to toolbar": "移动焦点到工具栏",
"Focus to element path": "移动焦点到元素路径",
"Focus to contextual toolbar": "移动焦点到上下文菜单",
"Insert link (if link plugin activated)": "插入链接 (如果链接插件已激活)",
"Save (if save plugin activated)": "保存(如果保存插件已激活)",
"Find (if searchreplace plugin activated)": "查找(如果查找替换插件已激活)",
"Plugins installed ({0}):": "已安装插件 ({0}):",
"Premium plugins:": "优秀插件:",
"Learn more...": "了解更多...",
"You are using {0}": "你正在使用 {0}",
"Plugins": "插件",
"Handy Shortcuts": "快捷键",
"Horizontal line": "水平分割线",
"Insert/edit image": "插入/编辑图片",
"Alternative description": "替代描述",
"Accessibility": "辅助功能",
"Image is decorative": "图像是装饰性的",
"Source": "源",
"Dimensions": "尺寸",
"Constrain proportions": "保持比例",
"General": "一般",
"Advanced": "高级",
"Style": "样式",
"Vertical space": "垂直间距",
"Horizontal space": "水平间距",
"Border": "框线",
"Insert image": "插入图片",
"Image...": "图片...",
"Image list": "图片清单",
"Resize": "调整大小",
"Insert date/time": "插入日期/时间",
"Date/time": "日期/时间",
"Insert/edit link": "插入/编辑链接",
"Text to display": "要显示的文本",
"Url": "地址",
"Open link in...": "链接打开位置...",
"Current window": "当前窗口",
"None": "无",
"New window": "新窗口",
"Open link": "打开链接",
"Remove link": "移除链接",
"Anchors": "锚点",
"Link...": "链接...",
"Paste or type a link": "粘贴或输入链接",
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "你所填写的URL地址为邮件地址,需要加上mailto: 前缀吗?",
"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?": "你所填写的URL地址属于外部链接,需要加上http:// 前缀吗?",
"The URL you entered seems to be an external link. Do you want to add the required https:// prefix?": "您输入的 URL 似乎是一个外部链接。您想添加所需的 https:// 前缀吗?",
"Link list": "链接清单",
"Insert video": "插入视频",
"Insert/edit video": "插入/编辑视频",
"Insert/edit media": "插入/编辑媒体",
"Alternative source": "镜像",
"Alternative source URL": "替代来源网址",
"Media poster (Image URL)": "封面(图片地址)",
"Paste your embed code below:": "将内嵌代码粘贴在下面:",
"Embed": "内嵌",
"Media...": "多媒体...",
"Nonbreaking space": "不间断空格",
"Page break": "分页符",
"Paste as text": "粘贴为文本",
"Preview": "预览",
"Print": "打印",
"Print...": "打印...",
"Save": "保存",
"Find": "寻找",
"Replace with": "替换为",
"Replace": "替换",
"Replace all": "替换全部",
"Previous": "上一个",
"Next": "下一个",
"Find and Replace": "查找和替换",
"Find and replace...": "查找并替换...",
"Could not find the specified string.": "未找到搜索内容。",
"Match case": "大小写匹配",
"Find whole words only": "全字匹配",
"Find in selection": "在选区中查找",
"Insert table": "插入表格",
"Table properties": "表格属性",
"Delete table": "删除表格",
"Cell": "单元格",
"Row": "行",
"Column": "栏目",
"Cell properties": "单元格属性",
"Merge cells": "合并单元格",
"Split cell": "拆分单元格",
"Insert row before": "在上方插入行",
"Insert row after": "在下方插入行",
"Delete row": "删除行",
"Row properties": "行属性",
"Cut row": "剪切行",
"Cut column": "剪切列",
"Copy row": "复制行",
"Copy column": "复制列",
"Paste row before": "粘贴行到上方",
"Paste column before": "粘贴此列前",
"Paste row after": "粘贴行到下方",
"Paste column after": "粘贴后面的列",
"Insert column before": "在左侧插入列",
"Insert column after": "在右侧插入列",
"Delete column": "删除列",
"Cols": "列",
"Rows": "行数",
"Width": "宽度",
"Height": "高度",
"Cell spacing": "单元格外间距",
"Cell padding": "单元格内边距",
"Row clipboard actions": "行剪贴板操作",
"Column clipboard actions": "列剪贴板操作",
"Table styles": "表格样式",
"Cell styles": "单元格样式",
"Column header": "列标题",
"Row header": "行头",
"Table caption": "表格标题",
"Caption": "标题",
"Show caption": "显示标题",
"Left": "左",
"Center": "居中",
"Right": "右",
"Cell type": "储存格别",
"Scope": "范围",
"Alignment": "对齐",
"Horizontal align": "水平对齐",
"Vertical align": "垂直对齐",
"Top": "上方对齐",
"Middle": "居中对齐",
"Bottom": "下方对齐",
"Header cell": "表头单元格",
"Row group": "行组",
"Column group": "列组",
"Row type": "行类型",
"Header": "表头",
"Body": "表体",
"Footer": "表尾",
"Border color": "框线颜色",
"Solid": "实线",
"Dotted": "虚线",
"Dashed": "虚线",
"Double": "双精度",
"Groove": "凹槽",
"Ridge": "海脊座",
"Inset": "嵌入",
"Outset": "外置",
"Hidden": "隐藏",
"Insert template...": "插入模板...",
"Templates": "模板",
"Template": "模板",
"Insert Template": "插入模板",
"Text color": "文本颜色",
"Background color": "背景颜色",
"Custom...": "自定义......",
"Custom color": "自定义颜色",
"No color": "无",
"Remove color": "移除颜色",
"Show blocks": "显示区块边框",
"Show invisible characters": "显示不可见字符",
"Word count": "字数",
"Count": "计数",
"Document": "文档",
"Selection": "选择",
"Words": "单词",
"Words: {0}": "字数:{0}",
"{0} words": "{0} 字",
"File": "文件",
"Edit": "编辑",
"Insert": "插入",
"View": "查看",
"Format": "格式",
"Table": "表格",
"Tools": "工具",
"Powered by {0}": "由{0}驱动",
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "编辑区。按ALT-F9打开菜单,按ALT-F10打开工具栏,按ALT-0查看帮助",
"Image title": "图片标题",
"Border width": "边框宽度",
"Border style": "边框样式",
"Error": "错误",
"Warn": "警告",
"Valid": "有效",
"To open the popup, press Shift+Enter": "按Shitf+Enter键打开对话框",
"Rich Text Area": "富文本区域",
"Rich Text Area. Press ALT-0 for help.": "编辑区。按Alt+0键打开帮助。",
"System Font": "系统字体",
"Failed to upload image: {0}": "图片上传失败: {0}",
"Failed to load plugin: {0} from url {1}": "插件加载失败: {0} 来自链接 {1}",
"Failed to load plugin url: {0}": "插件加载失败 链接: {0}",
"Failed to initialize plugin: {0}": "插件初始化失败: {0}",
"example": "示例",
"Search": "搜索",
"All": "全部",
"Currency": "货币",
"Text": "文字",
"Quotations": "引用",
"Mathematical": "数学",
"Extended Latin": "拉丁语扩充",
"Symbols": "符号",
"Arrows": "箭头",
"User Defined": "自定义",
"dollar sign": "美元符号",
"currency sign": "货币符号",
"euro-currency sign": "欧元符号",
"colon sign": "冒号",
"cruzeiro sign": "克鲁赛罗币符号",
"french franc sign": "法郎符号",
"lira sign": "里拉符号",
"mill sign": "密尔符号",
"naira sign": "奈拉符号",
"peseta sign": "比塞塔符号",
"rupee sign": "卢比符号",
"won sign": "韩元符号",
"new sheqel sign": "新谢克尔符号",
"dong sign": "越南盾符号",
"kip sign": "老挝基普符号",
"tugrik sign": "图格里克符号",
"drachma sign": "德拉克马符号",
"german penny symbol": "德国便士符号",
"peso sign": "比索符号",
"guarani sign": "瓜拉尼符号",
"austral sign": "澳元符号",
"hryvnia sign": "格里夫尼亚符号",
"cedi sign": "塞地符号",
"livre tournois sign": "里弗弗尔符号",
"spesmilo sign": "spesmilo符号",
"tenge sign": "坚戈符号",
"indian rupee sign": "印度卢比",
"turkish lira sign": "土耳其里拉",
"nordic mark sign": "北欧马克",
"manat sign": "马纳特符号",
"ruble sign": "卢布符号",
"yen character": "日元字样",
"yuan character": "人民币元字样",
"yuan character, in hong kong and taiwan": "元字样(港台地区)",
"yen/yuan character variant one": "元字样(大写)",
"Emojis": "Emojis",
"Emojis...": "Emojis...",
"Loading emojis...": "正在加载Emojis...",
"Could not load emojis": "无法加载Emojis",
"People": "人类",
"Animals and Nature": "动物和自然",
"Food and Drink": "食物和饮品",
"Activity": "活动",
"Travel and Places": "旅游和地点",
"Objects": "物件",
"Flags": "旗帜",
"Characters": "字符",
"Characters (no spaces)": "字符(无空格)",
"{0} characters": "{0} 个字符",
"Error: Form submit field collision.": "错误: 表单提交字段冲突。",
"Error: No form element found.": "错误: 没有表单控件。",
"Color swatch": "颜色样本",
"Color Picker": "选色器",
"Invalid hex color code: {0}": "十六进制颜色代码无效: {0}",
"Invalid input": "无效输入",
"R": "R",
"Red component": "红色部分",
"G": "G",
"Green component": "绿色部分",
"B": "B",
"Blue component": "白色部分",
"#": "#",
"Hex color code": "十六进制颜色代码",
"Range 0 to 255": "范围0至255",
"Turquoise": "青绿色",
"Green": "绿色",
"Blue": "蓝色",
"Purple": "紫色",
"Navy Blue": "海军蓝",
"Dark Turquoise": "深蓝绿色",
"Dark Green": "深绿色",
"Medium Blue": "中蓝色",
"Medium Purple": "中紫色",
"Midnight Blue": "深蓝色",
"Yellow": "黄色",
"Orange": "橙色",
"Red": "红色",
"Light Gray": "浅灰色",
"Gray": "灰色",
"Dark Yellow": "暗黄色",
"Dark Orange": "深橙色",
"Dark Red": "深红色",
"Medium Gray": "中灰色",
"Dark Gray": "深灰色",
"Light Green": "浅绿色",
"Light Yellow": "浅黄色",
"Light Red": "浅红色",
"Light Purple": "浅紫色",
"Light Blue": "浅蓝色",
"Dark Purple": "深紫色",
"Dark Blue": "深蓝色",
"Black": "黑色",
"White": "白色",
"Switch to or from fullscreen mode": "切换全屏模式",
"Open help dialog": "打开帮助对话框",
"history": "历史",
"styles": "样式",
"formatting": "格式化",
"alignment": "对齐",
"indentation": "缩进",
"Font": "字体",
"Size": "字号",
"More...": "更多...",
"Select...": "选择...",
"Preferences": "首选项",
"Yes": "是",
"No": "否",
"Keyboard Navigation": "键盘指引",
"Version": "版本",
"Code view": "代码视图",
"Open popup menu for split buttons": "打开弹出式菜单,用于拆分按钮",
"List Properties": "列表属性",
"List properties...": "标题字体属性",
"Start list at number": "以数字开始列表",
"Line height": "行高",
"Dropped file type is not supported": "此文件类型不支持拖放",
"Loading...": "加载中...",
"ImageProxy HTTP error: Rejected request": "图片代理请求错误:请求被拒绝",
"ImageProxy HTTP error: Could not find Image Proxy": "图片代理请求错误:无法找到图片代理",
"ImageProxy HTTP error: Incorrect Image Proxy URL": "图片代理请求错误:图片代理地址错误",
"ImageProxy HTTP error: Unknown ImageProxy error": "图片代理请求错误:未知的图片代理错误"
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 KiB

After

Width:  |  Height:  |  Size: 336 KiB

@ -1,4 +1,4 @@
import axios from 'axios' import Axios from 'axios'
import Api from '@/api' import Api from '@/api'
import Setting from '@/setting' import Setting from '@/setting'
import Util from '@/libs/util' import Util from '@/libs/util'
@ -129,11 +129,10 @@ export default {
powerpaste_word_import: 'clean', powerpaste_word_import: 'clean',
powerpaste_html_import: 'clean', powerpaste_html_import: 'clean',
// 自定义上传 // 自定义上传
images_upload_handler: function (blobInfo, succFun, failFun) { images_upload_handler: (blobInfo, progress) => new Promise((resolve, reject) => {
console.log("🚀 ~ file: editor.js ~ line 62 ~ blobInfo", blobInfo)
const form = new FormData() const form = new FormData()
form.append('file', blobInfo.blob()), form.append('file', blobInfo.blob())
axios({ Axios({
method: 'post', method: 'post',
url: Api.upload, url: Api.upload,
data: form, data: form,
@ -142,8 +141,8 @@ export default {
token: Util.local.get(Setting.tokenKey) token: Util.local.get(Setting.tokenKey)
}, },
}).then(({ data }) => { }).then(({ data }) => {
succFun(data.url) resolve(data.url)
}).catch(res => {}) }).catch(res => {})
}, }),
//icons:'ax-color', //icons:'ax-color',
} }

@ -216,7 +216,7 @@ export default {
<div class="tiny-wrap"> <div class="tiny-wrap">
<div class="block"> <div class="block">
<div class="fl"> <div class="fl">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/> <img class="pic" src="default.png"/>
<p class="img-des">图片描述</p> <p class="img-des">图片描述</p>
</div> </div>
<div class="texts"> <div class="texts">
@ -226,7 +226,7 @@ export default {
</div> </div>
<div class="block"> <div class="block">
<div class="fr"> <div class="fr">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/> <img class="pic" src="default.png"/>
<p class="img-des">图片描述</p> <p class="img-des">图片描述</p>
</div> </div>
<div> <div>
@ -241,12 +241,16 @@ export default {
<div class="tiny-wrap"> <div class="tiny-wrap">
<div class="block en-block"> <div class="block en-block">
<div class="fr"> <div class="fr">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/> <img class="pic" src="default.png"/>
<p class="img-des">Picture description</p> <p class="img-des">Picture description</p>
</div> </div>
<div> <div>
<p>One of the major barriers to treating pain effectively is rooted in providers fear of killing their patients. This includes caregivers who may be family or friends. In a 2014 study I led of nonprofessional hospice caregivers, we found that the majority of pain medication errors caregivers made involved administering less than the prescribed dose, which makes it difficult for patients to achieve optimal pain relief.</p> <p>One of the major barriers to treating pain effectively is rooted in providers fear of killing their patients. This includes caregivers who may be family or friends. In a 2014 study I led of nonprofessional hospice caregivers, we found that the majority of pain medication errors caregivers made involved administering less than the prescribed dose, which makes it difficult for patients to achieve optimal pain relief.</p>
<p>Meanwhile, more than 11 million Americans  often family members or friends provide unpaid care for people with Alzheimer's or other dementias, according to calculations by the Alzheimers Association. In 2021, caregivers for people with Alzheimers or other dementias provided an estimated 16 billion hours of unpaid care valued at nearly $272 billion.My father took her to the emergency room. A doctor found a severe knee infection and took her into surgery. She was hospitalized for two weeks, followed by two months of rehabilitation at a skilled nursing facility.</p> <p>Meanwhile, more than 11 million Americans  often family members or friends provide unpaid care for people with Alzheimer's or other dementias, according to calculations by the Alzheimers Association. In 2021, caregivers for people with Alzheimers or other dementias provided an estimated 16 billion hours of unpaid care valued at nearly $272 billion.My father took her to the emergency room. A doctor found a severe knee infection and took her into surgery. She was hospitalized for two weeks, followed by two months of rehabilitation at a skilled nursing facility.</p>
<p>If you heated the salt on your kitchen table up to 801 C (1,474 F), it would melt, and youd have molten salt. However, for making and storing energy, not just any salt will do. Scientists are exploring different combinations of salts to get the exact properties needed to cool and fuel a nuclear power reactor efficiently for decades. These properties include lower melting temperatures, the right consistency, and the ability to absorb high amounts of heat, among others.</p>
<div class="quote">We used experimental results to validate our simulation. At the same time, the simulation results provided us more details about which salts to study further. They work with each other. Jicheng Guo, chemical engineer at Argonne National Laboratory</div>
<p>Which molten salt blueprints will deliver the desired traits for a nuclear reactor? The potential variations are nearly endless. The study set out to determine whether computer simulations driven by machine learning could guide and refine real-world experiments at the Advanced Photon Source (APS), a DOE Office of Science user facility at Argonne. The results were recently published in the journal Physical Review B.</p>
<p>We used experimental results from the APS to validate our simulation. At the same time, the simulation results provided us more details about which salts to study further. They work with each other, said Jicheng Guo, a chemical engineer at Argonne and the papers lead author. This allows us to study multiple compositions at the same time.</p>
</div> </div>
</div> </div>
</div> </div>
@ -256,7 +260,7 @@ export default {
<div class="tiny-wrap"> <div class="tiny-wrap">
<div class="block" style="margin-bottom: 70px;"> <div class="block" style="margin-bottom: 70px;">
<div class="fr"> <div class="fr">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/> <img class="pic" src="default.png"/>
<p class="img-des">图片描述</p> <p class="img-des">图片描述</p>
</div> </div>
<div> <div>
@ -270,7 +274,7 @@ export default {
</div> </div>
<div class="block"> <div class="block">
<div class="img-wrap"> <div class="img-wrap">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/> <img class="pic" src="default.png"/>
<p class="img-des">图片描述</p> <p class="img-des">图片描述</p>
</div> </div>
<div class="texts"> <div class="texts">
@ -286,7 +290,7 @@ export default {
<div class="tiny-wrap"> <div class="tiny-wrap">
<div class="block"> <div class="block">
<div class="img-wrap"> <div class="img-wrap">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/> <img class="pic" src="default.png"/>
<p class="img-des">图片描述</p> <p class="img-des">图片描述</p>
</div> </div>
</div> </div>
@ -309,10 +313,9 @@ export default {
powerpaste_word_import: 'clean', powerpaste_word_import: 'clean',
powerpaste_html_import: 'clean', powerpaste_html_import: 'clean',
// 自定义上传 // 自定义上传
images_upload_handler: function (blobInfo, succFun, failFun) { images_upload_handler: (blobInfo, progress) => new Promise((resolve, reject) => {
console.log("🚀 ~ file: editor.js ~ line 62 ~ blobInfo", blobInfo)
const form = new FormData() const form = new FormData()
form.append('file', blobInfo.blob()), form.append('file', blobInfo.blob())
Axios({ Axios({
method: 'post', method: 'post',
url: Api.upload, url: Api.upload,
@ -322,9 +325,9 @@ export default {
token: Util.local.get(Setting.tokenKey) token: Util.local.get(Setting.tokenKey)
}, },
}).then(({ data }) => { }).then(({ data }) => {
succFun(data.url) resolve(data.url)
}).catch(res => {}) }).catch(res => {})
}, }),
//自定义文件选择器的回调内容 此方法只有在点击上方图片按钮才会触发 //自定义文件选择器的回调内容 此方法只有在点击上方图片按钮才会触发
file_picker_callback: function (callback, value, meta) { file_picker_callback: function (callback, value, meta) {
if (meta.filetype === 'file') { if (meta.filetype === 'file') {

@ -303,6 +303,7 @@
:on-success="uploadSuccessFile" :on-success="uploadSuccessFile"
:action="this.api.upload" :action="this.api.upload"
:file-list="form.fileList" :file-list="form.fileList"
:headers="headers"
:data="{ :data="{
quote: form.title, quote: form.title,
site: site.siteName, site: site.siteName,
@ -452,6 +453,9 @@ export default {
site: this.$store.state.content.site, site: this.$store.state.content.site,
userId: this.$store.state.user.userId, userId: this.$store.state.user.userId,
publicationTypes: ColumnConst.publicationTypes, publicationTypes: ColumnConst.publicationTypes,
headers: {
token: Util.local.get(Setting.tokenKey)
},
nameRepeat: false, nameRepeat: false,
sites: [], sites: [],
otherColumns: [], otherColumns: [],
@ -581,10 +585,8 @@ export default {
if (this.submiting) { if (this.submiting) {
next() next()
} else if (!this.pass) { } else if (!this.pass) {
const { updateTime } = this
console.log("🚀 ~ file: index.vue:525 ~ beforeRouteLeave ~ updateTime", updateTime)
// //
if (updateTime > 3) { if (this.updateTime > 1) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', { this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
@ -620,7 +622,6 @@ export default {
} }
]) ])
this.getList() this.getList()
this.form.id ? this.getData() : this.getColumn()
this.getSite() this.getSite()
this.getLabel() this.getLabel()
this.getTemplate() this.getTemplate()
@ -657,6 +658,7 @@ export default {
if (!ids.length) ids = [data[0].id] // id if (!ids.length) ids = [data[0].id] // id
this.form.columnId = ids this.form.columnId = ids
} }
this.form.id ? this.getData() : this.getColumn()
}).catch(err => {}) }).catch(err => {})
}, },
// id // id
@ -706,7 +708,7 @@ export default {
} }
this.getClassification() this.getClassification()
this.$nextTick(() => { this.$nextTick(() => {
this.updateTime = 2 this.updateTime = 0
}) })
}).catch(err => {}) }).catch(err => {})
}, },
@ -995,8 +997,10 @@ export default {
}) })
}, },
// //
handleRemove(e) { handleRemove(e, fileList) {
this.$post(`${this.api.delContentFile}?id=${e.id}`).then(res => {}).catch(res => {}) e.id && this.$post(`${this.api.delContentFile}?id=${e.id}`).then(res => {
this.form.fileList = fileList
}).catch(res => {})
}, },
// banner // banner
uploadSuccessBanner(res) { uploadSuccessBanner(res) {
@ -1040,7 +1044,7 @@ export default {
this.pass = true this.pass = true
const { updateTime } = this const { updateTime } = this
// //
if (updateTime > 2) { if (updateTime > 1) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', { this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {

@ -120,7 +120,7 @@
@change="getArticle"></el-cascader> @change="getArticle"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="文章"> <el-form-item label="文章">
<el-select v-model="article"> <el-select v-model="article" clearable>
<el-option <el-option
v-for="item in articles" v-for="item in articles"
:key="item.id" :key="item.id"
@ -157,7 +157,7 @@
@change="getArticle"></el-cascader> @change="getArticle"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="文章"> <el-form-item label="文章">
<el-select v-model="otherArticle"> <el-select v-model="otherArticle" clearable>
<el-option <el-option
v-for="item in articles" v-for="item in articles"
:key="item.id" :key="item.id"

@ -209,6 +209,7 @@
<script> <script>
import util from '@/libs/util' import util from '@/libs/util'
import Setting from '@/setting' import Setting from '@/setting'
import Axios from 'axios'
export default { export default {
data() { data() {
const accountPass = (rule, value, callback) => { const accountPass = (rule, value, callback) => {
@ -802,7 +803,12 @@ export default {
}, },
// //
showFaild() { showFaild() {
location.href = `${this.api.exportFailure}?exportCode=${this.exportCode}` Axios.get(`${this.api.exportFailure}?exportCode=${this.exportCode}`, {
headers: this.headers,
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`导入用户失败原因.xls`, new Blob([res.data]))
}).catch(res => {})
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
this.uploadFaild = false this.uploadFaild = false

@ -6,7 +6,7 @@ const isDev = process.env.NODE_ENV === 'development' // 开发环境
let host = `${location.origin}/` let host = `${location.origin}/`
if (isDev) { if (isDev) {
host = 'http://192.168.31.136:10000/' // 测试服 host = 'http://192.168.31.136:10000/' // 测试服
// host = 'http://192.168.31.51:10000/' // 榕 host = 'http://192.168.31.51:10000/' // 榕
// host = 'http://192.168.31.116:10000/' // 赓 // host = 'http://192.168.31.116:10000/' // 赓
} }

Loading…
Cancel
Save