Merge commit 'f73ee2c13bd3eff393a768ecd2e83a213a75b678' into pro
# Conflicts: # public/site/css/help.css # public/site/en/help.html
@ -1043,6 +1043,62 @@ class ProjectController extends AbstractController
|
|||||||
return Base::retSuccess('success', $data);
|
return Base::retSuccess('success', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api {get} api/project/task/easylists 18. 任务列表-简单的
|
||||||
|
*
|
||||||
|
* @apiDescription 需要token身份
|
||||||
|
* @apiVersion 1.0.0
|
||||||
|
* @apiGroup project
|
||||||
|
* @apiName task__easylists
|
||||||
|
|
||||||
|
* @apiParam {String} [taskid] 排除的任务ID
|
||||||
|
* @apiParam {String} [userid] 用户ID(如:1,2)
|
||||||
|
* @apiParam {String} [timerange] 时间范围(如:2022-03-01 12:12:12,2022-05-01 12:12:12)
|
||||||
|
*
|
||||||
|
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||||
|
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||||
|
* @apiSuccess {Object} data 返回数据
|
||||||
|
*/
|
||||||
|
public function task__easylists()
|
||||||
|
{
|
||||||
|
User::auth();
|
||||||
|
//
|
||||||
|
$taskid = trim(Request::input('taskid'));
|
||||||
|
$userid = Request::input('userid');
|
||||||
|
$timerange = Request::input('timerange');
|
||||||
|
//
|
||||||
|
$list = ProjectTask::with(['taskUser'])
|
||||||
|
->select('projects.name as project_name', 'project_tasks.id', 'project_tasks.name', 'project_tasks.start_at', 'project_tasks.end_at')
|
||||||
|
->join('projects','project_tasks.project_id','=','projects.id')
|
||||||
|
->leftJoin('project_task_users', function ($query) {
|
||||||
|
$query->on('project_tasks.id', '=', 'project_task_users.task_id')->where('project_task_users.owner', '=', 1);
|
||||||
|
})
|
||||||
|
->whereIn('project_task_users.userid', is_array($userid) ? $userid : explode(',', $userid) )
|
||||||
|
->when(!empty($timerange), function ($query) use ($timerange) {
|
||||||
|
if (!is_array($timerange)) {
|
||||||
|
$timerange = explode(',', $timerange);
|
||||||
|
}
|
||||||
|
if (Base::isDateOrTime($timerange[0]) && Base::isDateOrTime($timerange[1])) {
|
||||||
|
$query->where('project_tasks.start_at', '>=', Carbon::parse($timerange[0])->startOfDay());
|
||||||
|
$query->where('project_tasks.end_at', '<=', Carbon::parse($timerange[1])->endOfDay());
|
||||||
|
}
|
||||||
|
})
|
||||||
|
->when(!empty($taskid), function ($query) use ($taskid) {
|
||||||
|
$query->where('project_tasks.id', "!=", $taskid);
|
||||||
|
})
|
||||||
|
->whereNull('complete_at')
|
||||||
|
->distinct()
|
||||||
|
->orderByDesc('project_tasks.id')
|
||||||
|
->paginate(Base::getPaginate(200, 100));
|
||||||
|
//
|
||||||
|
$list->transform(function ($customer) {
|
||||||
|
$customer->setAppends([]);
|
||||||
|
return $customer;
|
||||||
|
});
|
||||||
|
//
|
||||||
|
return Base::retSuccess('success', $list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {get} api/project/task/export 19. 导出任务(限管理员)
|
* @api {get} api/project/task/export 19. 导出任务(限管理员)
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1249,3 +1249,6 @@ Markdown 格式发送
|
|||||||
继续
|
继续
|
||||||
退出
|
退出
|
||||||
会议组件加载失败!
|
会议组件加载失败!
|
||||||
|
|
||||||
|
以下人员已存在任务
|
||||||
|
确定
|
||||||
@ -16883,5 +16883,16 @@
|
|||||||
"de": "Geladen mit fallender fracht des meetings!",
|
"de": "Geladen mit fallender fracht des meetings!",
|
||||||
"fr": "Échec du chargement du composant conférence!",
|
"fr": "Échec du chargement du composant conférence!",
|
||||||
"id": "Perakitan perakitan gagal!"
|
"id": "Perakitan perakitan gagal!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "以下人员已存在任务",
|
||||||
|
"zh": "",
|
||||||
|
"zh-CHT": "以下人員已存在任務",
|
||||||
|
"en": "The following personnel already have tasks",
|
||||||
|
"ko": "다음 구성원에 대한 작업이 이미 있습니다",
|
||||||
|
"ja": "次の者には任務があります",
|
||||||
|
"de": "Die folgenden personen haben den auftrag erledigt",
|
||||||
|
"fr": "Les personnes suivantes ont déjà une mission",
|
||||||
|
"id": "Yang berikut ini ada tugas"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
2
public/language/web/de.js
vendored
2
public/language/web/en.js
vendored
2
public/language/web/fr.js
vendored
2
public/language/web/id.js
vendored
2
public/language/web/ja.js
vendored
2
public/language/web/key.js
vendored
2
public/language/web/ko.js
vendored
2
public/language/web/zh-CHT.js
vendored
2
public/language/web/zh.js
vendored
@ -1 +1 @@
|
|||||||
if(typeof window.LANGUAGE_DATA==="undefined")window.LANGUAGE_DATA={};window.LANGUAGE_DATA["zh"]=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
if(typeof window.LANGUAGE_DATA==="undefined")window.LANGUAGE_DATA={};window.LANGUAGE_DATA["zh"]=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||||
3
public/site/css/help.css
vendored
@ -114,7 +114,8 @@
|
|||||||
|
|
||||||
.r-ul-item-pic1 {
|
.r-ul-item-pic1 {
|
||||||
display: block;
|
display: block;
|
||||||
height: 316px;
|
max-width: 90%;
|
||||||
|
margin: 12px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.r-ul-item-pic2 {
|
.r-ul-item-pic2 {
|
||||||
|
|||||||
@ -192,7 +192,7 @@
|
|||||||
<div class="logs-layout">
|
<div class="logs-layout">
|
||||||
<div class="logs-l logs-sticky">
|
<div class="logs-l logs-sticky">
|
||||||
<h5 class="logs-h5 mb-16">Logs</h5>
|
<h5 class="logs-h5 mb-16">Logs</h5>
|
||||||
<ul class="logs-l-ul logs-l-1920"></ul>
|
<ul class="logs-l-ul logs-l-1920" id="help-l-ul"></ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="logs-r" id="google_translate_element">
|
<div class="logs-r" id="google_translate_element">
|
||||||
<h1 class="txt-6003645 logs-h1 mb-36">DooTask Update Log </h1>
|
<h1 class="txt-6003645 logs-h1 mb-36">DooTask Update Log </h1>
|
||||||
@ -282,19 +282,6 @@
|
|||||||
<script src="//cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.js"></script>
|
<script src="//cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.js"></script>
|
||||||
<script src="../js/common.js"></script>
|
<script src="../js/common.js"></script>
|
||||||
<script>
|
<script>
|
||||||
window.onload = function() {
|
|
||||||
const targetId = window.location.hash.substring(1); // 获取 URL 中的锚点 id
|
|
||||||
const targetElement = document.getElementById(targetId); // 获取目标锚点元素
|
|
||||||
if (targetElement) {
|
|
||||||
const offset = 80; // 上偏移量(可以根据需要进行调整)
|
|
||||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
|
||||||
// 滚动到目标位置,并考虑上偏移量
|
|
||||||
window.scrollTo({
|
|
||||||
top: targetPosition - offset,
|
|
||||||
behavior: "smooth"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const getItem = (key)=> {
|
const getItem = (key)=> {
|
||||||
var record = JSON.parse(localStorage.getItem(key));
|
var record = JSON.parse(localStorage.getItem(key));
|
||||||
if (!record) return null;
|
if (!record) return null;
|
||||||
@ -323,24 +310,26 @@ function domHandle (html){
|
|||||||
const changelog = document.querySelector('.logs-r-ul');
|
const changelog = document.querySelector('.logs-r-ul');
|
||||||
const rlog = document.querySelector('.logs-l-1920');
|
const rlog = document.querySelector('.logs-l-1920');
|
||||||
const rlog2 = document.querySelector('.logs-l-768');
|
const rlog2 = document.querySelector('.logs-l-768');
|
||||||
const versions = html.match(/<h2>(.*?)<\/h2>/g).slice(0, 10);
|
const versions = html.match(/<h2>(.*?)<\/h2>/g).slice(0, 15);
|
||||||
const versionsNumbers = versions.map(str => str.split('<h2>[')[1].split(']</h2>')[0]);
|
const versionsNumbers = versions.map(str => str.split('<h2>[')[1].split(']</h2>')[0]);
|
||||||
for (let i = 0; i < versionsNumbers.length; i++) {
|
for (let i = 0; i < versionsNumbers.length; i++) {
|
||||||
const updatesHtml = html.split(versionsNumbers[i])[1].split('<h2>')[0].match(/<li>(.*?)<\/li>/g);
|
const updatesHtml = html.split(versionsNumbers[i])[1].split('<h2>')[0].match(/<li>(.*?)<\/li>/g);
|
||||||
const updatesHtmlText = updatesHtml.map(str => str.split('<li>')[1].split('</li>')[0]);
|
const updatesHtmlText = updatesHtml.map(str => str.split('<li>')[1].split('</li>')[0]);
|
||||||
const rLi = document.createElement('li');
|
const rLi = document.createElement('li');
|
||||||
rLi.className = `l-ul-item ${i==0?'active':''}`;
|
rLi.className = `l-ul-item ${i==0?'active':''}`;
|
||||||
|
rLi.setAttribute('data-id',`section-${i+1}`)
|
||||||
rLi.innerHTML = `
|
rLi.innerHTML = `
|
||||||
<a class="txt-4001620 txt log-a" href="#section-${i+1}">v${versionsNumbers[i]} update</a>
|
<a class="txt-4001620 txt log-a">v${versionsNumbers[i]} update</a>
|
||||||
`;
|
`;
|
||||||
const rLi2 = document.createElement('li');
|
const rLi2 = document.createElement('li');
|
||||||
rLi2.className = `l-ul-item`;
|
rLi2.className = `l-ul-item`;
|
||||||
|
rLi2.setAttribute('data-id',`section-${i+1}`)
|
||||||
rLi2.addEventListener('click', function() {
|
rLi2.addEventListener('click', function() {
|
||||||
const logsDrawer = document.querySelector('.logs-drawer');
|
const logsDrawer = document.querySelector('.logs-drawer');
|
||||||
logsDrawer.classList.remove('open-logs-drawer');
|
logsDrawer.classList.remove('open-logs-drawer');
|
||||||
});
|
});
|
||||||
rLi2.innerHTML = `
|
rLi2.innerHTML = `
|
||||||
<a class="txt-4001620 txt log-a" href="#section-${i+1}">v${versionsNumbers[i]} update</a>
|
<a class="txt-4001620 txt">v${versionsNumbers[i]} update</a>
|
||||||
`;
|
`;
|
||||||
rlog.appendChild(rLi);
|
rlog.appendChild(rLi);
|
||||||
rlog2.appendChild(rLi2);
|
rlog2.appendChild(rLi2);
|
||||||
@ -349,7 +338,7 @@ function domHandle (html){
|
|||||||
li.className = 'r-ul-item mb-36';
|
li.className = 'r-ul-item mb-36';
|
||||||
li.innerHTML = `
|
li.innerHTML = `
|
||||||
<ol class="logs-r-ol">
|
<ol class="logs-r-ol">
|
||||||
<li class="txt-4001624 r-ol-item mb-24"><h4 class="logs-h4" id="section-${i+1}">v${versionsNumbers[i]} update</h4></li>
|
<li class="txt-4001624 r-ol-item mb-24" id="section-${i+1}"><h4 class="logs-h4">v${versionsNumbers[i]} update</h4></li>
|
||||||
</ol>
|
</ol>
|
||||||
`;
|
`;
|
||||||
changelog.appendChild(li);
|
changelog.appendChild(li);
|
||||||
@ -429,34 +418,80 @@ if(!logs) {
|
|||||||
let record = {value: html, expired: new Date().getTime() + 30 * 60 * 1000};
|
let record = {value: html, expired: new Date().getTime() + 30 * 60 * 1000};
|
||||||
localStorage.setItem('logs',JSON.stringify(record))
|
localStorage.setItem('logs',JSON.stringify(record))
|
||||||
domHandle(html)
|
domHandle(html)
|
||||||
|
logsHandler()
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
console.log(err,"err");
|
console.log(err,"err");
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
domHandle(logs)
|
domHandle(logs)
|
||||||
|
logsHandler()
|
||||||
}
|
}
|
||||||
|
let tabItems1 = document.querySelectorAll('.l-ul-item');
|
||||||
|
function rm(){
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
tabItems1.forEach(link1=>{
|
||||||
const anchors = document.querySelectorAll("a[href^='#section-']");
|
link1.classList.remove('active')
|
||||||
// 遍历所有锚点链接
|
})
|
||||||
for (const anchor of anchors) {
|
}
|
||||||
anchor.addEventListener("click", function(event) {
|
function logsHandler(){
|
||||||
event.preventDefault(); // 阻止默认的跳转行为
|
let tabItems = document.querySelectorAll('.l-ul-item');
|
||||||
const targetId = anchor.getAttribute("href").substring(1); // 获取目标锚点的 id
|
function rm(){
|
||||||
const targetElement = document.getElementById(targetId); // 获取目标锚点元素
|
tabItems.forEach(link1=>{
|
||||||
if (targetElement) {
|
link1.classList.remove('active')
|
||||||
const offset = 80; // 上偏移量(可以根据需要进行调整)
|
})
|
||||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
}
|
||||||
|
tabItems.forEach(item=>{
|
||||||
|
item.addEventListener('click',function(event){
|
||||||
|
event.preventDefault()
|
||||||
|
const id = event.currentTarget.getAttribute('data-id')
|
||||||
|
const content = document.getElementById(`${id}`)
|
||||||
|
if (content) {
|
||||||
|
const offset = 90; // 上偏移量(可以根据需要进行调整)
|
||||||
|
const targetPosition = content.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
||||||
// 滚动到目标位置,并考虑上偏移量
|
// 滚动到目标位置,并考虑上偏移量
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: targetPosition-offset,
|
top: targetPosition-offset,
|
||||||
behavior: "smooth"
|
behavior: "smooth"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function getAllDataIds(parentId) {
|
||||||
|
let parentElement = document.getElementById(parentId);
|
||||||
|
if (parentElement) {
|
||||||
|
let elementsWithDataId = parentElement.querySelectorAll("[data-id]");
|
||||||
|
let dataIds = [];
|
||||||
|
for (let i = 0; i < elementsWithDataId.length; i++) {
|
||||||
|
let dataId = elementsWithDataId[i].getAttribute("data-id");
|
||||||
|
dataIds.push(dataId);
|
||||||
}
|
}
|
||||||
|
return dataIds;
|
||||||
});
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
let allDataIds = getAllDataIds("help-l-ul");
|
||||||
|
let arrOffsetTop = []
|
||||||
|
allDataIds.map(item=>{
|
||||||
|
let id = document.getElementById(`${item}`);
|
||||||
|
arrOffsetTop.push(id.offsetTop)
|
||||||
|
})
|
||||||
|
// 监听页面滚动事件
|
||||||
|
window.addEventListener('scroll',scrollHandler)
|
||||||
|
function scrollHandler(){
|
||||||
|
for (let i = 0; i < arrOffsetTop.length; i++) {
|
||||||
|
if(window.scrollY<=arrOffsetTop[0]){
|
||||||
|
rm()
|
||||||
|
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${1}` + "']");
|
||||||
|
elementsWithDataId[1]?.classList?.add("active");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (arrOffsetTop[i] > window.scrollY || window.scrollY<=arrOffsetTop[0]){
|
||||||
|
rm()
|
||||||
|
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
|
||||||
|
elementsWithDataId[1]?.classList?.add("active");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 174 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 212 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 120 KiB |
@ -157,13 +157,13 @@
|
|||||||
<a class="txt-4001620 txt" href="#section-13">团队和成员</a>
|
<a class="txt-4001620 txt" href="#section-13">团队和成员</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item" onclick="closeHelpDraweHandle()">
|
<li class="l-ul-item" onclick="closeHelpDraweHandle()">
|
||||||
<a class="txt-4001620 txt" href="#section-14">成员分组</a>
|
<a class="txt-4001620 txt" href="#section-14">团队管理</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item" onclick="closeHelpDraweHandle()">
|
<li class="l-ul-item" onclick="closeHelpDraweHandle()">
|
||||||
<a class="txt-4001620 txt" href="#section-15">团队管理</a>
|
<a class="txt-4001620 txt" href="#section-15">团队设置</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item" onclick="closeHelpDraweHandle()">
|
<li class="l-ul-item" onclick="closeHelpDraweHandle()">
|
||||||
<a class="txt-4001620 txt" href="#section-16">团队设置</a>
|
<a class="txt-4001620 txt" href="#section-16">成员分组</a>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
@ -277,86 +277,86 @@
|
|||||||
<i class="search-icon"></i>
|
<i class="search-icon"></i>
|
||||||
<input class="search-input mb-24" placeholder="Search" type="text">
|
<input class="search-input mb-24" placeholder="Search" type="text">
|
||||||
</form>
|
</form>
|
||||||
<ul class="help-l-ul help-l-1920">
|
<ul class="help-l-ul help-l-1920" id="help-l-ul">
|
||||||
<li class="help-l-ul-item mb-24">
|
<li class="help-l-ul-item mb-24">
|
||||||
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">基本</h5>
|
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">基本</h5>
|
||||||
<ol class="help-l-ol">
|
<ol class="help-l-ol">
|
||||||
<li class="l-ul-item active">
|
<li class="l-ul-item active" data-id="section-1">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-1">了解DooTask</a>
|
<a class="txt-4001620 txt help-a">了解DooTask</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-2">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-2">注册和登录</a>
|
<a class="txt-4001620 txt help-a">注册和登录</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-3">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-3">通知公告</a>
|
<a class="txt-4001620 txt help-a">通知公告</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-4">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-4">帐户设置</a>
|
<a class="txt-4001620 txt help-a">帐户设置</a>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
<li class="help-l-ul-item mb-24">
|
<li class="help-l-ul-item mb-24">
|
||||||
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">项目</h5>
|
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">项目</h5>
|
||||||
<ol class="help-l-ol">
|
<ol class="help-l-ol">
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-5">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-5">了解项目</a>
|
<a class="txt-4001620 txt help-a">了解项目</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-6">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-6">创建项目</a>
|
<a class="txt-4001620 txt help-a">创建项目</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-7">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-7">任务列表</a>
|
<a class="txt-4001620 txt help-a">任务列表</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-8">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-8">项目进展</a>
|
<a class="txt-4001620 txt help-a">项目进展</a>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
<li class="help-l-ul-item mb-24">
|
<li class="help-l-ul-item mb-24">
|
||||||
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">任务</h5>
|
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">任务</h5>
|
||||||
<ol class="help-l-ol">
|
<ol class="help-l-ol">
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-9">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-9">任务的使用</a>
|
<a class="txt-4001620 txt help-a">任务的使用</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-10">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-10">任务优先级</a>
|
<a class="txt-4001620 txt help-a">任务优先级</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-11">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-11">评论与新闻</a>
|
<a class="txt-4001620 txt help-a">评论与新闻</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-12">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-12">次要任务</a>
|
<a class="txt-4001620 txt help-a">次要任务</a>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
<li class="help-l-ul-item mb-24">
|
<li class="help-l-ul-item mb-24">
|
||||||
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">团队</h5>
|
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">团队</h5>
|
||||||
<ol class="help-l-ol">
|
<ol class="help-l-ol">
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-13">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-13">团队和成员</a>
|
<a class="txt-4001620 txt help-a">团队和成员</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-14">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-14">成员分组</a>
|
<a class="txt-4001620 txt help-a">团队管理</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-15">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-15">团队管理</a>
|
<a class="txt-4001620 txt help-a">团队设置</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-16">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-16">团队设置</a>
|
<a class="txt-4001620 txt help-a">成员分组</a>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
<li class="help-l-ul-item mb-24">
|
<li class="help-l-ul-item mb-24">
|
||||||
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">文件</h5>
|
<h5 class="txt-4001620 help-h5 mb-16" style="font-weight: 500;">文件</h5>
|
||||||
<ol class="help-l-ol">
|
<ol class="help-l-ol">
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-17">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-17">文件类型</a>
|
<a class="txt-4001620 txt help-a">文件类型</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-18">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-18">共享的文件</a>
|
<a class="txt-4001620 txt help-a">共享的文件</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="l-ul-item">
|
<li class="l-ul-item" data-id="section-19">
|
||||||
<a class="txt-4001620 txt help-a" href="#section-19">访问权限</a>
|
<a class="txt-4001620 txt help-a">访问权限</a>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
@ -568,7 +568,7 @@
|
|||||||
<h4 class="txt-5002430 help-h4 mb-24">人事行政管理</h4>
|
<h4 class="txt-5002430 help-h4 mb-24">人事行政管理</h4>
|
||||||
<h6 class="txt-4001624 help-h6">通过数据可视化统计报表获取多维度企业数据,全面了解员工表现,让绩效评价更客观、公正;使用公告发布通知,安排公司活动,传递企业决策,便于塑造企业文化,让员工更有参与感。</h6>
|
<h6 class="txt-4001624 help-h6">通过数据可视化统计报表获取多维度企业数据,全面了解员工表现,让绩效评价更客观、公正;使用公告发布通知,安排公司活动,传递企业决策,便于塑造企业文化,让员工更有参与感。</h6>
|
||||||
</li>
|
</li>
|
||||||
<li class="r-ul-item mb-36" id="section-15">
|
<li class="r-ul-item mb-36" id="section-14">
|
||||||
<h4 class="txt-5002430 help-h4 mb-24">工作报告</h4>
|
<h4 class="txt-5002430 help-h4 mb-24">工作报告</h4>
|
||||||
<h6 class="txt-4001624 help-h6">1 我的汇报:</h6>
|
<h6 class="txt-4001624 help-h6">1 我的汇报:</h6>
|
||||||
<h6 class="txt-4001624 help-h6">汇报搜索</h6>
|
<h6 class="txt-4001624 help-h6">汇报搜索</h6>
|
||||||
@ -595,7 +595,7 @@
|
|||||||
<h6 class="txt-4001624 help-h6">点击用户左上角头像→点击【团队管理】,根据需求选择点击【导出任务统计】/【导出超期任务】/【导出审批数据】/【导出签到数据】,导出关联数据记录。</h6>
|
<h6 class="txt-4001624 help-h6">点击用户左上角头像→点击【团队管理】,根据需求选择点击【导出任务统计】/【导出超期任务】/【导出审批数据】/【导出签到数据】,导出关联数据记录。</h6>
|
||||||
<img class="r-ul-item-pic1" id="help_pic_team7" src="../img/light/help_pic_team7.png" alt="数据导出">
|
<img class="r-ul-item-pic1" id="help_pic_team7" src="../img/light/help_pic_team7.png" alt="数据导出">
|
||||||
</li>
|
</li>
|
||||||
<li class="r-ul-item mb-36" id="section-16">
|
<li class="r-ul-item mb-36" id="section-15">
|
||||||
<h4 class="txt-5002430 help-h4 mb-24">新建部门</h4>
|
<h4 class="txt-5002430 help-h4 mb-24">新建部门</h4>
|
||||||
<h6 class="txt-4001624 help-h6">(1) 点击用户左上角头像→点击【团队管理】列表中的“团队管理”选项,进入页面左下角点击【新建部门】;</h6>
|
<h6 class="txt-4001624 help-h6">(1) 点击用户左上角头像→点击【团队管理】列表中的“团队管理”选项,进入页面左下角点击【新建部门】;</h6>
|
||||||
<img class="r-ul-item-pic1" id="help_pic_team8" src="../img/light/help_pic_team8.png" alt="新建部门">
|
<img class="r-ul-item-pic1" id="help_pic_team8" src="../img/light/help_pic_team8.png" alt="新建部门">
|
||||||
@ -606,14 +606,14 @@
|
|||||||
<li class="r-ul-item mb-36">
|
<li class="r-ul-item mb-36">
|
||||||
<h4 class="txt-5002430 help-h4 mb-24">搜索成员</h4>
|
<h4 class="txt-5002430 help-h4 mb-24">搜索成员</h4>
|
||||||
<h6 class="txt-4001624 help-h6">点击用户左上角头像→点击【团队管理】列表中的“团队管理”选项,在页面上方选择需要查询的关键词/身份/在职状态/邮箱认证,点击【搜索】,即可展示相关人员信息。</h6>
|
<h6 class="txt-4001624 help-h6">点击用户左上角头像→点击【团队管理】列表中的“团队管理”选项,在页面上方选择需要查询的关键词/身份/在职状态/邮箱认证,点击【搜索】,即可展示相关人员信息。</h6>
|
||||||
<img class="r-ul-item-pic1" id="help_pic_creat_task10" src="../img/light/help_pic_creat_task10.png" alt="搜索成员">
|
<img class="r-ul-item-pic1" id="help_pic_team10" src="../img/light/help_pic_team10.png" alt="搜索成员">
|
||||||
</li>
|
</li>
|
||||||
<li class="r-ul-item mb-36">
|
<li class="r-ul-item mb-36">
|
||||||
<h4 class="txt-5002430 help-h4 mb-24">团队成员操作</h4>
|
<h4 class="txt-5002430 help-h4 mb-24">团队成员操作</h4>
|
||||||
<h6 class="txt-4001624 help-h6">点击用户左上角头像→点击【团队管理】列表中的“团队管理”选项,点击对应人员信息【操作】按键,可对该成员选择进行:设为管理员/设为临时账号/修改邮箱/修改密码/修改部门/操作离职/删除的操作。</h6>
|
<h6 class="txt-4001624 help-h6">点击用户左上角头像→点击【团队管理】列表中的“团队管理”选项,点击对应人员信息【操作】按键,可对该成员选择进行:设为管理员/设为临时账号/修改邮箱/修改密码/修改部门/操作离职/删除的操作。</h6>
|
||||||
<img class="r-ul-item-pic1" id="help_pic_team11" src="../img/light/help_pic_team11.png" alt="团队成员操作">
|
<img class="r-ul-item-pic1" id="help_pic_team11" src="../img/light/help_pic_team11.png" alt="团队成员操作">
|
||||||
</li>
|
</li>
|
||||||
<li class="r-ul-item mb-36" id="section-14">
|
<li class="r-ul-item mb-36" id="section-16">
|
||||||
<h4 class="txt-5002430 help-h4 mb-24">项目成员</h4>
|
<h4 class="txt-5002430 help-h4 mb-24">项目成员</h4>
|
||||||
<h6 class="txt-4001624 help-h6">(1) 选择对应项目,点击右上方【成员管理】,添加/删除项目成员;</h6>
|
<h6 class="txt-4001624 help-h6">(1) 选择对应项目,点击右上方【成员管理】,添加/删除项目成员;</h6>
|
||||||
<h6 class="txt-4001624 help-h6">(2) 点击【取消】取消成员管理设置,点击【保存】保存成员修改管理操作。</h6>
|
<h6 class="txt-4001624 help-h6">(2) 点击【取消】取消成员管理设置,点击【保存】保存成员修改管理操作。</h6>
|
||||||
@ -732,17 +732,28 @@
|
|||||||
</body>
|
</body>
|
||||||
<script src="../js/common.js"></script>
|
<script src="../js/common.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const tabs = document.querySelector('.help-l-1920');
|
const tabItems = document.querySelectorAll('.l-ul-item');
|
||||||
const tabItems = tabs.querySelectorAll('.l-ul-item');
|
function rm(){
|
||||||
tabs.addEventListener('click', function (event) {
|
tabItems.forEach(link1=>{
|
||||||
const clickedItem = event.target.closest('.l-ul-item');
|
link1.classList.remove('active')
|
||||||
if (clickedItem && !clickedItem.classList.contains('active')) {
|
})
|
||||||
// 切换激活状态
|
}
|
||||||
for (let [index,value] of tabItems.entries()) {
|
tabItems.forEach(item=>{
|
||||||
value.classList.toggle('active', value === clickedItem);
|
item.addEventListener('click',function(event){
|
||||||
|
event.preventDefault()
|
||||||
|
const id = event.currentTarget.getAttribute('data-id')
|
||||||
|
const content = document.getElementById(`${id}`)
|
||||||
|
if (content) {
|
||||||
|
const offset = 90; // 上偏移量(可以根据需要进行调整)
|
||||||
|
const targetPosition = content.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
||||||
|
// 滚动到目标位置,并考虑上偏移量
|
||||||
|
window.scrollTo({
|
||||||
|
top: targetPosition-offset,
|
||||||
|
behavior: "smooth"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
});
|
})
|
||||||
/* 当屏幕宽度低于768px时显示logs的抽屉的相关操作逻辑 */
|
/* 当屏幕宽度低于768px时显示logs的抽屉的相关操作逻辑 */
|
||||||
const helpMenuBtn = document.getElementById('help-menu-btn');
|
const helpMenuBtn = document.getElementById('help-menu-btn');
|
||||||
const helpDrawer = document.querySelector('.help-drawer');
|
const helpDrawer = document.querySelector('.help-drawer');
|
||||||
@ -752,25 +763,48 @@ helpMenuBtn.addEventListener('click', () => {
|
|||||||
const closeHelpDraweHandle = ()=>{
|
const closeHelpDraweHandle = ()=>{
|
||||||
helpDrawer.classList.remove('open-help-drawer');
|
helpDrawer.classList.remove('open-help-drawer');
|
||||||
}
|
}
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
// 监听页面滚动事件
|
||||||
const anchors = document.querySelectorAll("a[href^='#section-']");
|
window.addEventListener('scroll',scrollHandler)
|
||||||
// 遍历所有锚点链接
|
|
||||||
for (const anchor of anchors) {
|
function getAllDataIds(parentId) {
|
||||||
anchor.addEventListener("click", function(event) {
|
let parentElement = document.getElementById(parentId);
|
||||||
event.preventDefault(); // 阻止默认的跳转行为
|
if (parentElement) {
|
||||||
const targetId = anchor.getAttribute("href").substring(1); // 获取目标锚点的 id
|
let elementsWithDataId = parentElement.querySelectorAll("[data-id]");
|
||||||
const targetElement = document.getElementById(targetId); // 获取目标锚点元素
|
let dataIds = [];
|
||||||
if (targetElement) {
|
for (let i = 0; i < elementsWithDataId.length; i++) {
|
||||||
const offset = 90; // 上偏移量(可以根据需要进行调整)
|
let dataId = elementsWithDataId[i].getAttribute("data-id");
|
||||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
dataIds.push(dataId);
|
||||||
// 滚动到目标位置,并考虑上偏移量
|
|
||||||
window.scrollTo({
|
|
||||||
top: targetPosition-offset,
|
|
||||||
behavior: "smooth"
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
return dataIds;
|
||||||
}
|
}
|
||||||
});
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
let allDataIds = getAllDataIds("help-l-ul");
|
||||||
|
let arrOffsetTop = []
|
||||||
|
allDataIds.map(item=>{
|
||||||
|
let id = document.getElementById(`${item}`);
|
||||||
|
arrOffsetTop.push(id.offsetTop)
|
||||||
|
})
|
||||||
|
function scrollHandler(){
|
||||||
|
// 遍历导航链接元素
|
||||||
|
allDataIds.map(item=>{
|
||||||
|
let elements = document.querySelectorAll("[data-id='" + item + "']");
|
||||||
|
elements[0]?.classList?.remove("active");
|
||||||
|
})
|
||||||
|
for (let i = 0; i < arrOffsetTop.length; i++) {
|
||||||
|
if(window.scrollY<=arrOffsetTop[0]){
|
||||||
|
rm()
|
||||||
|
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${1}` + "']");
|
||||||
|
elementsWithDataId[0]?.classList?.add("active");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (arrOffsetTop[i] > window.scrollY){
|
||||||
|
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
|
||||||
|
elementsWithDataId[0]?.classList?.add("active");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -192,7 +192,7 @@
|
|||||||
<div class="logs-layout">
|
<div class="logs-layout">
|
||||||
<div class="logs-l logs-sticky">
|
<div class="logs-l logs-sticky">
|
||||||
<h5 class="logs-h5 mb-16" style="font-weight: 500;">更新日志</h5>
|
<h5 class="logs-h5 mb-16" style="font-weight: 500;">更新日志</h5>
|
||||||
<ul class="logs-l-ul logs-l-1920"></ul>
|
<ul class="logs-l-ul logs-l-1920" id="help-l-ul"></ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="logs-r">
|
<div class="logs-r">
|
||||||
<h1 class="txt-6003645 logs-h1 mb-36">DooTask更新日志</h1>
|
<h1 class="txt-6003645 logs-h1 mb-36">DooTask更新日志</h1>
|
||||||
@ -282,19 +282,6 @@
|
|||||||
<script src="//cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.js"></script>
|
<script src="//cdn.bootcdn.net/ajax/libs/axios/1.3.6/axios.js"></script>
|
||||||
<script src="../js/common.js"></script>
|
<script src="../js/common.js"></script>
|
||||||
<script>
|
<script>
|
||||||
window.onload = function() {
|
|
||||||
const targetId = window.location.hash.substring(1); // 获取 URL 中的锚点 id
|
|
||||||
const targetElement = document.getElementById(targetId); // 获取目标锚点元素
|
|
||||||
if (targetElement) {
|
|
||||||
const offset = 80; // 上偏移量(可以根据需要进行调整)
|
|
||||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
|
||||||
// 滚动到目标位置,并考虑上偏移量
|
|
||||||
window.scrollTo({
|
|
||||||
top: targetPosition - offset,
|
|
||||||
behavior: "smooth"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const getItem = (key)=> {
|
const getItem = (key)=> {
|
||||||
var record = JSON.parse(localStorage.getItem(key));
|
var record = JSON.parse(localStorage.getItem(key));
|
||||||
if (!record) return null;
|
if (!record) return null;
|
||||||
@ -330,17 +317,19 @@ const domHandle = (html)=>{
|
|||||||
const updatesHtmlText = updatesHtml.map(str => str.split('<li>')[1].split('</li>')[0]);
|
const updatesHtmlText = updatesHtml.map(str => str.split('<li>')[1].split('</li>')[0]);
|
||||||
const rLi = document.createElement('li');
|
const rLi = document.createElement('li');
|
||||||
rLi.className = `l-ul-item ${i==0?'active':''}`;
|
rLi.className = `l-ul-item ${i==0?'active':''}`;
|
||||||
|
rLi.setAttribute('data-id',`section-${i+1}`)
|
||||||
rLi.innerHTML = `
|
rLi.innerHTML = `
|
||||||
<a class="txt-4001620 txt log-a" href="#section-${i+1}">v${versionsNumbers[i]} 更新</a>
|
<a class="txt-4001620 txt log-a">v${versionsNumbers[i]} 更新</a>
|
||||||
`;
|
`;
|
||||||
const rLi2 = document.createElement('li');
|
const rLi2 = document.createElement('li');
|
||||||
rLi2.className = `l-ul-item`;
|
rLi2.className = `l-ul-item`;
|
||||||
|
rLi2.setAttribute('data-id',`section-${i+1}`)
|
||||||
rLi2.addEventListener('click', function() {
|
rLi2.addEventListener('click', function() {
|
||||||
const logsDrawer = document.querySelector('.logs-drawer');
|
const logsDrawer = document.querySelector('.logs-drawer');
|
||||||
logsDrawer.classList.remove('open-logs-drawer');
|
logsDrawer.classList.remove('open-logs-drawer');
|
||||||
});
|
});
|
||||||
rLi2.innerHTML = `
|
rLi2.innerHTML = `
|
||||||
<a class="txt-4001620 txt log-a" href="#section-${i+1}" >v${versionsNumbers[i]} 更新</a>
|
<a class="txt-4001620 txt">v${versionsNumbers[i]} 更新</a>
|
||||||
`;
|
`;
|
||||||
rlog.appendChild(rLi);
|
rlog.appendChild(rLi);
|
||||||
rlog2.appendChild(rLi2);
|
rlog2.appendChild(rLi2);
|
||||||
@ -348,7 +337,7 @@ const domHandle = (html)=>{
|
|||||||
li.className = 'r-ul-item mb-36';
|
li.className = 'r-ul-item mb-36';
|
||||||
li.innerHTML = `
|
li.innerHTML = `
|
||||||
<ol class="logs-r-ol">
|
<ol class="logs-r-ol">
|
||||||
<li class="txt-4001624 r-ol-item mb-24"><h4 class="logs-h4" id="section-${i+1}">v${versionsNumbers[i]} 更新</h4></li>
|
<li class="txt-4001624 r-ol-item mb-24" id="section-${i+1}"><h4 class="logs-h4">v${versionsNumbers[i]} 更新</h4></li>
|
||||||
</ol>
|
</ol>
|
||||||
`
|
`
|
||||||
changelog.appendChild(li);
|
changelog.appendChild(li);
|
||||||
@ -388,7 +377,6 @@ const domHandle = (html)=>{
|
|||||||
if(section.offsetParent.offsetTop <= currentScrollPosition){
|
if(section.offsetParent.offsetTop <= currentScrollPosition){
|
||||||
// 将对应的菜单项设置为激活状态
|
// 将对应的菜单项设置为激活状态
|
||||||
const activeMenuItem = logs_tabItems[index];
|
const activeMenuItem = logs_tabItems[index];
|
||||||
console.log(activeMenuItem,"activeMenuItem");
|
|
||||||
if (activeMenuItem) {
|
if (activeMenuItem) {
|
||||||
Array.from(logs_tabItems).forEach(titem => titem.classList.remove('active'));
|
Array.from(logs_tabItems).forEach(titem => titem.classList.remove('active'));
|
||||||
activeMenuItem.classList.add('active');
|
activeMenuItem.classList.add('active');
|
||||||
@ -428,32 +416,80 @@ if(!logs) {
|
|||||||
let record = {value: html, expired: new Date().getTime() + 30 * 60 * 1000};
|
let record = {value: html, expired: new Date().getTime() + 30 * 60 * 1000};
|
||||||
localStorage.setItem('logs',JSON.stringify(record))
|
localStorage.setItem('logs',JSON.stringify(record))
|
||||||
domHandle(html)
|
domHandle(html)
|
||||||
|
logsHandler()
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
console.log(err,"err");
|
console.log(err,"err");
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
domHandle(logs)
|
domHandle(logs)
|
||||||
|
logsHandler()
|
||||||
}
|
}
|
||||||
|
let tabItems1 = document.querySelectorAll('.l-ul-item');
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
function rm(){
|
||||||
const anchors = document.querySelectorAll("a[href^='#section-']");
|
tabItems1.forEach(link1=>{
|
||||||
// 遍历所有锚点链接
|
link1.classList.remove('active')
|
||||||
for (const anchor of anchors) {
|
})
|
||||||
anchor.addEventListener("click", function(event) {
|
}
|
||||||
event.preventDefault(); // 阻止默认的跳转行为
|
function logsHandler(){
|
||||||
const targetId = anchor.getAttribute("href").substring(1); // 获取目标锚点的 id
|
let tabItems = document.querySelectorAll('.l-ul-item');
|
||||||
const targetElement = document.getElementById(targetId); // 获取目标锚点元素
|
function rm(){
|
||||||
if (targetElement) {
|
tabItems.forEach(link1=>{
|
||||||
const offset = 80; // 上偏移量(可以根据需要进行调整)
|
link1.classList.remove('active')
|
||||||
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
})
|
||||||
|
}
|
||||||
|
tabItems.forEach(item=>{
|
||||||
|
item.addEventListener('click',function(event){
|
||||||
|
event.preventDefault()
|
||||||
|
const id = event.currentTarget.getAttribute('data-id')
|
||||||
|
const content = document.getElementById(`${id}`)
|
||||||
|
if (content) {
|
||||||
|
const offset = 90; // 上偏移量(可以根据需要进行调整)
|
||||||
|
const targetPosition = content.getBoundingClientRect().top + window.pageYOffset; // 目标位置相对于视口的位置
|
||||||
// 滚动到目标位置,并考虑上偏移量
|
// 滚动到目标位置,并考虑上偏移量
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: targetPosition-offset,
|
top: targetPosition-offset,
|
||||||
behavior: "smooth"
|
behavior: "smooth"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function getAllDataIds(parentId) {
|
||||||
|
let parentElement = document.getElementById(parentId);
|
||||||
|
if (parentElement) {
|
||||||
|
let elementsWithDataId = parentElement.querySelectorAll("[data-id]");
|
||||||
|
let dataIds = [];
|
||||||
|
for (let i = 0; i < elementsWithDataId.length; i++) {
|
||||||
|
let dataId = elementsWithDataId[i].getAttribute("data-id");
|
||||||
|
dataIds.push(dataId);
|
||||||
}
|
}
|
||||||
});
|
return dataIds;
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
let allDataIds = getAllDataIds("help-l-ul");
|
||||||
|
let arrOffsetTop = []
|
||||||
|
allDataIds.map(item=>{
|
||||||
|
let id = document.getElementById(`${item}`);
|
||||||
|
arrOffsetTop.push(id.offsetTop)
|
||||||
|
})
|
||||||
|
// 监听页面滚动事件
|
||||||
|
window.addEventListener('scroll',scrollHandler)
|
||||||
|
function scrollHandler(){
|
||||||
|
for (let i = 0; i < arrOffsetTop.length; i++) {
|
||||||
|
if(window.scrollY<=arrOffsetTop[0]){
|
||||||
|
rm()
|
||||||
|
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${1}` + "']");
|
||||||
|
elementsWithDataId[1]?.classList?.add("active");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (arrOffsetTop[i] > window.scrollY || window.scrollY<=arrOffsetTop[0]){
|
||||||
|
rm()
|
||||||
|
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
|
||||||
|
elementsWithDataId[1]?.classList?.add("active");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,8 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="common-tag-input" :class="{focus:isFocus}" @paste="pasteText($event)" @click="focus">
|
<div class="common-tag-input" :class="{focus:isFocus}" @paste="pasteText($event)" @click="focus">
|
||||||
<div class="tags-item" v-for="(text, index) in disSource">
|
<Draggable
|
||||||
<span class="tags-content" @click.stop="">{{text}}</span><span class="tags-del" @click.stop="delTag(index)">×</span>
|
:list="disSource"
|
||||||
|
:animation="150"
|
||||||
|
tag="ul"
|
||||||
|
draggable=".column-item"
|
||||||
|
>
|
||||||
|
<div class="tags-item column-item" v-for="(text, index) in disSource">
|
||||||
|
<span class="tags-content" @click.stop="edit(disSource,index)">{{text}}</span><span class="tags-del" @click.stop="delTag(index)">×</span>
|
||||||
</div>
|
</div>
|
||||||
|
</Draggable>
|
||||||
<textarea
|
<textarea
|
||||||
ref="myTextarea"
|
ref="myTextarea"
|
||||||
class="tags-input"
|
class="tags-input"
|
||||||
@ -22,8 +29,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Draggable from 'vuedraggable'
|
||||||
export default {
|
export default {
|
||||||
name: 'TagInput',
|
name: 'TagInput',
|
||||||
|
components: {Draggable},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
default: ''
|
default: ''
|
||||||
@ -52,11 +61,13 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const disSource = [];
|
const disSource = [];
|
||||||
|
if( this.value ){
|
||||||
this.value?.split(",").forEach(item => {
|
this.value?.split(",").forEach(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
disSource.push(item)
|
disSource.push(item)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
|
|
||||||
@ -69,7 +80,19 @@
|
|||||||
|
|
||||||
disSource,
|
disSource,
|
||||||
|
|
||||||
isFocus: false
|
isFocus: false,
|
||||||
|
|
||||||
|
editShow: false,
|
||||||
|
editData:{
|
||||||
|
index:0,
|
||||||
|
disSource:[],
|
||||||
|
name:""
|
||||||
|
},
|
||||||
|
addRule: {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: this.$L('请填写名称!'), trigger: 'change' },
|
||||||
|
]
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -80,6 +103,7 @@
|
|||||||
this.wayMinWidth();
|
this.wayMinWidth();
|
||||||
},
|
},
|
||||||
value(val) {
|
value(val) {
|
||||||
|
if( val && typeof val == 'string' ){
|
||||||
let disSource = [];
|
let disSource = [];
|
||||||
val?.split(",").forEach(item => {
|
val?.split(",").forEach(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
@ -87,6 +111,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.disSource = disSource;
|
this.disSource = disSource;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
disSource(val) {
|
disSource(val) {
|
||||||
let temp = '';
|
let temp = '';
|
||||||
@ -109,6 +134,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
edit(disSource,index){
|
||||||
|
this.editData.disSource = disSource
|
||||||
|
this.editData.index = index
|
||||||
|
this.editData.name = disSource[index] + ''
|
||||||
|
$A.modalInput({
|
||||||
|
title: `编辑`,
|
||||||
|
placeholder: `请输入名称`,
|
||||||
|
okText: "确定",
|
||||||
|
value: disSource[index] + '',
|
||||||
|
onOk: (desc) => {
|
||||||
|
if (!desc) {
|
||||||
|
return `请输入名称`
|
||||||
|
}
|
||||||
|
this.editData.name = desc
|
||||||
|
this.editData.disSource[this.editData.index] = desc
|
||||||
|
this.$set(this.disSource,this.editData.index,desc)
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
focus(option) {
|
focus(option) {
|
||||||
const $el = this.$refs.myTextarea;
|
const $el = this.$refs.myTextarea;
|
||||||
$el.focus(option);
|
$el.focus(option);
|
||||||
|
|||||||
@ -203,6 +203,8 @@
|
|||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<TaskExistTips ref="taskExistTipsRef" @onAdd="onAdd(again,true)"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -210,10 +212,11 @@
|
|||||||
import TEditor from "../../../components/TEditor";
|
import TEditor from "../../../components/TEditor";
|
||||||
import {mapState} from "vuex";
|
import {mapState} from "vuex";
|
||||||
import UserSelect from "../../../components/UserSelect.vue";
|
import UserSelect from "../../../components/UserSelect.vue";
|
||||||
|
import TaskExistTips from "./TaskExistTips.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TaskAdd",
|
name: "TaskAdd",
|
||||||
components: {UserSelect, TEditor},
|
components: {UserSelect, TEditor, TaskExistTips},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@ -280,6 +283,8 @@ export default {
|
|||||||
isMounted: false,
|
isMounted: false,
|
||||||
|
|
||||||
beforeClose: [],
|
beforeClose: [],
|
||||||
|
|
||||||
|
again: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -523,12 +528,30 @@ export default {
|
|||||||
this.addData = Object.assign({}, this.addData, data);
|
this.addData = Object.assign({}, this.addData, data);
|
||||||
},
|
},
|
||||||
|
|
||||||
onAdd(again) {
|
async onAdd(again,affirm=false) {
|
||||||
if (!this.addData.name) {
|
if (!this.addData.name) {
|
||||||
$A.messageError("任务描述不能为空");
|
$A.messageError("任务描述不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loadIng++;
|
this.loadIng++;
|
||||||
|
|
||||||
|
// 存在任务提示
|
||||||
|
if (!affirm && this.addData.owner.length > 0) {
|
||||||
|
this.$refs['taskExistTipsRef'].isExistTask({
|
||||||
|
userids: this.addData.owner,
|
||||||
|
timerange: this.addData.times
|
||||||
|
}).then(res => {
|
||||||
|
if (!res) {
|
||||||
|
this.onAdd(again, true)
|
||||||
|
} else {
|
||||||
|
this.loadIng--;
|
||||||
|
this.again = again
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.$store.dispatch("taskAdd", this.addData).then(({msg}) => {
|
this.$store.dispatch("taskAdd", this.addData).then(({msg}) => {
|
||||||
this.loadIng--;
|
this.loadIng--;
|
||||||
$A.messageSuccess(msg);
|
$A.messageSuccess(msg);
|
||||||
|
|||||||
@ -451,6 +451,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!taskDetail.id" class="task-load"><Loading/></div>
|
<div v-if="!taskDetail.id" class="task-load"><Loading/></div>
|
||||||
|
<!-- 提示 -->
|
||||||
|
<TaskExistTips ref="taskExistTipsRef" @onAdd="updateData('times', updateParams)"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -465,12 +467,21 @@ import {Store} from "le5le-store";
|
|||||||
import TaskMenu from "./TaskMenu";
|
import TaskMenu from "./TaskMenu";
|
||||||
import ChatInput from "./ChatInput";
|
import ChatInput from "./ChatInput";
|
||||||
import UserSelect from "../../../components/UserSelect.vue";
|
import UserSelect from "../../../components/UserSelect.vue";
|
||||||
|
import TaskExistTips from "./TaskExistTips.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TaskDetail",
|
name: "TaskDetail",
|
||||||
components: {
|
components: {
|
||||||
UserSelect,
|
UserSelect,
|
||||||
ChatInput, TaskMenu, ProjectLog, DialogWrapper, TaskUpload, TaskPriority, TEditor},
|
TaskExistTips,
|
||||||
|
ChatInput,
|
||||||
|
TaskMenu,
|
||||||
|
ProjectLog,
|
||||||
|
DialogWrapper,
|
||||||
|
TaskUpload,
|
||||||
|
TaskPriority,
|
||||||
|
TEditor
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
taskId: {
|
taskId: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@ -576,6 +587,8 @@ export default {
|
|||||||
{key: 'year', label: '每年'},
|
{key: 'year', label: '每年'},
|
||||||
{key: 'custom', label: '自定义'},
|
{key: 'custom', label: '自定义'},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
updateParams: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -975,7 +988,20 @@ export default {
|
|||||||
if (!desc) {
|
if (!desc) {
|
||||||
return `请输入修改备注`
|
return `请输入修改备注`
|
||||||
}
|
}
|
||||||
this.updateData("times", Object.assign(params, {desc}))
|
this.updateParams = Object.assign(params, { desc })
|
||||||
|
if (params.start_at && params.end_at) {
|
||||||
|
this.$refs['taskExistTipsRef'].isExistTask({
|
||||||
|
taskid: this.taskDetail.id,
|
||||||
|
userids: this.taskDetail.owner_userid,
|
||||||
|
timerange: [params.start_at, params.end_at]
|
||||||
|
}).then(res => {
|
||||||
|
if (!res) {
|
||||||
|
this.updateData("times", this.updateParams)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.updateData("times", this.updateParams)
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
103
resources/assets/js/pages/manage/components/TaskExistTips.vue
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<template>
|
||||||
|
<Modal v-model="show" :title="$L('以下人员已存在任务')" class="task-exist-tips" width="640">
|
||||||
|
<List :split="false" size="small">
|
||||||
|
<ListItem v-for="(items, userid) in tipsTask" :key="userid">
|
||||||
|
<div class="list-content">
|
||||||
|
<UserAvatar :userid="userid" :size="28" :show-icon="true" :show-name="true" tooltipDisabled />
|
||||||
|
<div class="list-task" v-for="(item, key) in items" :key="key">
|
||||||
|
<div class="list-task-info">
|
||||||
|
<span>[{{ item.project_name }}] </span>
|
||||||
|
<span>{{ item.name }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="list-task-date">{{ getCutTime(item) }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
<div slot="footer">
|
||||||
|
<Button type="default" @click="show = false">{{ $L('取消') }}</Button>
|
||||||
|
<Button type="primary" @click="onAdd()">{{ $L('确定') }}</Button>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import TEditor from "../../../components/TEditor";
|
||||||
|
import UserSelect from "../../../components/UserSelect.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "TaskExistTips",
|
||||||
|
components: { UserSelect, TEditor },
|
||||||
|
props: {
|
||||||
|
value: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isExist: false,
|
||||||
|
show: false,
|
||||||
|
tipsTask: [],
|
||||||
|
loadIng: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
onAdd() {
|
||||||
|
this.$emit('onAdd', {})
|
||||||
|
this.show = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
getCutTime(item) {
|
||||||
|
let start_at = $A.Date(item.start_at, true);
|
||||||
|
let end_at = $A.Date(item.end_at, true);
|
||||||
|
let string = "";
|
||||||
|
if ($A.formatDate('Y/m/d', start_at) == $A.formatDate('Y/m/d', end_at)) {
|
||||||
|
string = $A.formatDate('Y/m/d H:i', start_at) + " ~ " + $A.formatDate('H:i', end_at)
|
||||||
|
} else if ($A.formatDate('Y', start_at) == $A.formatDate('Y', end_at)) {
|
||||||
|
string = $A.formatDate('Y/m/d', start_at) + " ~ " + $A.formatDate('m/d', end_at)
|
||||||
|
string = string.replace(/( 00:00| 23:59)/g, "")
|
||||||
|
} else {
|
||||||
|
string = $A.formatDate('Y/m/d H:i', start_at) + " ~ " + $A.formatDate('Y/m/d H:i', end_at)
|
||||||
|
string = string.replace(/( 00:00| 23:59)/g, "")
|
||||||
|
}
|
||||||
|
return string
|
||||||
|
},
|
||||||
|
|
||||||
|
isExistTask({ userids, timerange, taskid }) {
|
||||||
|
this.isExist = false;
|
||||||
|
return new Promise(async resolve => {
|
||||||
|
this.$store.dispatch("call", {
|
||||||
|
url: 'project/task/easylists',
|
||||||
|
data: {
|
||||||
|
userid: userids,
|
||||||
|
timerange: timerange,
|
||||||
|
taskid: taskid
|
||||||
|
},
|
||||||
|
method: 'get',
|
||||||
|
}).then(({ data }) => {
|
||||||
|
if (data.data.length > 0) {
|
||||||
|
this.show = true;
|
||||||
|
let taskObj = {}
|
||||||
|
userids.map(userid => {
|
||||||
|
data.data.map(h => {
|
||||||
|
if ((h.task_user || []).map(k => k.owner ? k.userid : 0).indexOf(userid) !== -1) {
|
||||||
|
if (!taskObj[userid]) {
|
||||||
|
taskObj[userid] = [];
|
||||||
|
}
|
||||||
|
taskObj[userid].push(h);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.tipsTask = taskObj
|
||||||
|
this.isExist = true;
|
||||||
|
}
|
||||||
|
resolve(this.isExist)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -23,3 +23,4 @@
|
|||||||
@import "task-priority";
|
@import "task-priority";
|
||||||
@import "team-management";
|
@import "team-management";
|
||||||
@import "update-log";
|
@import "update-log";
|
||||||
|
@import "task-exist-tips";
|
||||||
|
|||||||
40
resources/assets/sass/pages/components/task-exist-tips.scss
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
.task-exist-tips {
|
||||||
|
|
||||||
|
.ivu-modal-body {
|
||||||
|
padding: 0px 26px 16px 26px !important;
|
||||||
|
max-height: 500px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-content {
|
||||||
|
flex: 1;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-task {
|
||||||
|
@media (min-width: 450px) {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
margin-left: 34px;
|
||||||
|
margin-top: 10px;
|
||||||
|
width: calc(100% - 34px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-task-info {
|
||||||
|
min-width: 135px;
|
||||||
|
flex: 1;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
span:first-child {
|
||||||
|
color: #A7ABB5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-task-date {
|
||||||
|
min-width: 135px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1 +1 @@
|
|||||||
Subproject commit d46b0c36a6899c35f86ea896f9761c41c38be2b2
|
Subproject commit 96ee6fb0afb6271f0cc0cd7d881fd9b5605b2ff0
|
||||||