' + options.content + '
', + loading: true, + onOk: () => { + callback() + } + }); +}; + +/** + * 获取完整的api请求地址 + */ +export const getFullUrl = (api) => { + return process.env.VUE_APP_API_URL + '/' + api +}; + +export const getApiUrl = (api) => { + if ( + process.env.VUE_APP_CROSS_DOMAIN === 'true' + || process.env.VUE_APP_CROSS_DOMAIN === true + || process.env.VUE_APP_CROSS_DOMAIN === '' + || process.env.VUE_APP_CROSS_DOMAIN === null) { + return process.env.VUE_APP_API_URL + '/' + api; //开启跨域直接返回 + } + if (process.env.NODE_ENV === 'production') { + return process.env.VUE_APP_API_URL + '/' + api; + } else { + return '/api/' + api; + } +}; + +/** + * 获取上传文件地址 + * @param api + * @returns {string} + */ +export const getUploadUrl = (api) => { + let baseUrl = ''; + // if (process.env.NODE_ENV === 'production') { + // baseUrl = process.env.VUE_APP_API_URL + // } + return baseUrl + getApiUrl(api) +}; + + +export const format_date = (data, show = true) => { + //格式化时间 + let now = null; + if (isNaN(data)) { + now = new Date(data * 1000); + + } else { + now = new Date(data); + } + let year = now.getFullYear(); + let month = now.getMonth() + 1; + let date = now.getDate(); + let hour = now.getHours(); + let minute = now.getMinutes(); + // let second = now.getSeconds(); + if (month < 10) { + month = '0' + month; + } + if (date < 10) { + date = '0' + date; + } + if (hour < 10) { + hour = '0' + hour; + } + if (minute < 10) { + minute = '0' + minute; + } + const finally_date = { + year: year, + month: month, + day: date, + hour: hour, + minute: minute + }; + if (show) { + return year + "-" + month + "-" + date + " " + hour + ":" + minute; + } else { + return finally_date + } +}; +/** + * 转换时间为可阅读格式,传入date的time值 + * @param time + * @returns {*} + */ +export const prettyTime2Chinese = (time) => { + if (!time) { + return ''; + } + if (isNaN(time)) { + return '格式不正确'; + } + var minute = 60 * 1000, //1分钟 + hour = 60 * minute, //1小时 + day = 24 * hour, //1天 + month = 12 * day,//月 + year = 12 * month;//年 + + var diff = new Date().getTime() - time; + var r = 0; + if (diff > year) { + r = parseInt(diff / year); + return r + "年前"; + } + if (diff > month) { + r = parseInt(diff / month); + return r + "个月前"; + } + if (diff > day) { + r = parseInt(diff / day); + if (r == 1) { + return "昨天"; + } + return r + "天前"; + } + if (diff > hour) { + r = parseInt(diff / hour); + return r + "个小时前"; + } + if (diff > minute) { + r = parseInt(diff / minute); + return r + "分钟前"; + } + return "刚刚"; +}; + +/** + * 数字转英文字母 + * 如:1->A + * @param num + * @returns {string} + */ +export const convert = (num) => { + let result = ""; + while (num) { + result = String.fromCharCode(--num % 26 + 65) + result; + num = Math.floor(num / 26) + } + return result +}; + +export function timeFix() { + const time = new Date(); + const hour = time.getHours(); + return hour < 9 ? '早上好' : (hour <= 11 ? '上午好' : (hour <= 13 ? '中午好' : (hour < 20 ? '下午好' : '晚上好'))) +} + +export function getAuthorization() { + let tokenList = getStore('tokenList', true); + if (tokenList) { + let accessToken = tokenList.accessToken; + let tokenType = tokenList.tokenType; + return {Authorization: `${tokenType} ${accessToken}`}; + } + return {}; +} + +/** + * 获取推送消息 + * 如:1->A + * @param num + * @returns {string} + */ +export const getPushData = (data) => { + return JSON.parse(data) +}; +// export const snail = (array) => { +// let arrs = []; +// for(var i=0,l=array.length;i{{item.title}}
+ + +链接有效日期:{{linkInfo.overTime}}
+链接有效日期:{{linkInfo.overTime}}
+项目封面
+最佳图片比例为300*150
+项目名称
+项目进度 (%)
+项目简介
+项目公开性
+项目拥有者
+看板风格
+自动更新项目进度
+项目ID
+任务开始时间
+新任务默认开启隐私模式
+
+
+
+ 规则名称 +
+选择任务列表
+选择条件
+选择执行者
+选择结果
+流转任务列表
+选择执行者
+修改任务状态
+选择执行者
+流转任务列表
+修改任务状态
+项目操作
+已选择 {{publishTask.selectTaskList.length}} + 项
+请勾选需要发布的内容
+{{inviteLink.member.name}}
+{{inviteLink.member.email}}
+『 {{ yiyan.hitokoto }}』 —— 《{{ yiyan.from }}》
+
暂无项目
+{{ item.content }}
+ +
+ 详细资料
+
+
+
+ 任务安排
+
+ Ta的项目 +
+{{project.name}}
+card content
+card content
+card content
+暂无可用版本
+{{ item.content }}
+ + {{ formatTime(item.create_time) }} + +{{project.description}}
+
+