mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-18 07:12:49 +00:00
Merge branch 'master' of github.com:kuaifan/dootask into develop
# Conflicts: # electron/package.json # package.json # public/css/app.css # public/js/app.js # public/js/build/153.js # public/js/build/189.js # public/js/build/189.js.LICENSE.txt # public/js/build/206.js # public/js/build/486.js # public/js/build/501.js # public/js/build/528.js # public/js/build/544.js # public/js/build/601.js # public/js/build/747.js # public/js/build/756.js.LICENSE.txt # public/js/build/762.js # public/js/build/836.js # public/js/build/889.js # public/js/build/954.js # public/js/build/956.js.LICENSE.txt
This commit is contained in:
commit
60086ead7c
@ -70,11 +70,7 @@ class WebSocketDialogMsg extends AbstractModel
|
|||||||
public function getPercentageAttribute()
|
public function getPercentageAttribute()
|
||||||
{
|
{
|
||||||
if (!isset($this->appendattrs['percentage'])) {
|
if (!isset($this->appendattrs['percentage'])) {
|
||||||
if ($this->read > $this->send || empty($this->send)) {
|
$this->generatePercentage();
|
||||||
$this->appendattrs['percentage'] = 100;
|
|
||||||
} else {
|
|
||||||
$this->appendattrs['percentage'] = intval($this->read / $this->send * 100);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return $this->appendattrs['percentage'];
|
return $this->appendattrs['percentage'];
|
||||||
}
|
}
|
||||||
@ -98,6 +94,22 @@ class WebSocketDialogMsg extends AbstractModel
|
|||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取占比
|
||||||
|
* @param bool $increment 是否新增阅读数
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function generatePercentage($increment = false) {
|
||||||
|
if ($increment) {
|
||||||
|
$this->increment('read');
|
||||||
|
}
|
||||||
|
if ($this->read > $this->send || empty($this->send)) {
|
||||||
|
return $this->appendattrs['percentage'] = 100;
|
||||||
|
} else {
|
||||||
|
return $this->appendattrs['percentage'] = intval($this->read / $this->send * 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标记已送达 同时 告诉发送人已送达
|
* 标记已送达 同时 告诉发送人已送达
|
||||||
* @param $userid
|
* @param $userid
|
||||||
@ -127,13 +139,17 @@ class WebSocketDialogMsg extends AbstractModel
|
|||||||
if (!$msgRead->read_at) {
|
if (!$msgRead->read_at) {
|
||||||
$msgRead->read_at = Carbon::now();
|
$msgRead->read_at = Carbon::now();
|
||||||
$msgRead->save();
|
$msgRead->save();
|
||||||
$this->increment('read');
|
$this->generatePercentage(true);
|
||||||
PushTask::push([
|
PushTask::push([
|
||||||
'userid' => $this->userid,
|
'userid' => $this->userid,
|
||||||
'msg' => [
|
'msg' => [
|
||||||
'type' => 'dialog',
|
'type' => 'dialog',
|
||||||
'mode' => 'update',
|
'mode' => 'readed',
|
||||||
'data' => $this->toArray(),
|
'data' => [
|
||||||
|
'id' => $this->id,
|
||||||
|
'read' => $this->read,
|
||||||
|
'percentage' => $this->percentage,
|
||||||
|
],
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -127,9 +127,11 @@ class WebSocketService implements WebSocketHandlerInterface
|
|||||||
case 'readMsg':
|
case 'readMsg':
|
||||||
$ids = is_array($data['id']) ? $data['id'] : [$data['id']];
|
$ids = is_array($data['id']) ? $data['id'] : [$data['id']];
|
||||||
$userid = $this->getUserid($frame->fd);
|
$userid = $this->getUserid($frame->fd);
|
||||||
$list = WebSocketDialogMsg::whereIn('id', $ids)->get();
|
WebSocketDialogMsg::whereIn('id', $ids)->chunkById(20, function($list) use ($userid) {
|
||||||
$list->transform(function(WebSocketDialogMsg $item) use ($userid) {
|
/** @var WebSocketDialogMsg $item */
|
||||||
$item->readSuccess($userid);
|
foreach ($list as $item) {
|
||||||
|
$item->readSuccess($userid);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
35
cmd
35
cmd
@ -13,6 +13,7 @@ Error="${Red}[错误]${Font}"
|
|||||||
|
|
||||||
cur_path="$(pwd)"
|
cur_path="$(pwd)"
|
||||||
cur_arg=$@
|
cur_arg=$@
|
||||||
|
COMPOSE="docker-compose"
|
||||||
|
|
||||||
judge() {
|
judge() {
|
||||||
if [[ 0 -eq $? ]]; then
|
if [[ 0 -eq $? ]]; then
|
||||||
@ -57,18 +58,22 @@ check_docker() {
|
|||||||
fi
|
fi
|
||||||
docker-compose version &> /dev/null
|
docker-compose version &> /dev/null
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -e "${Error} ${RedBG} 未安装 Docker-compose!${Font}"
|
docker compose version &> /dev/null
|
||||||
exit 1
|
if [ $? -ne 0 ]; then
|
||||||
|
echo -e "${Error} ${RedBG} 未安装 Docker-compose!${Font}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
COMPOSE="docker compose"
|
||||||
fi
|
fi
|
||||||
if [[ -n `docker-compose version | grep "docker-compose" | grep -E "\sv*1"` ]]; then
|
if [[ -n `$COMPOSE version | grep -E "\sv*1"` ]]; then
|
||||||
docker-compose version
|
$COMPOSE version
|
||||||
echo -e "${Error} ${RedBG} Docker-compose 版本过低,请升级至v2+!${Font}"
|
echo -e "${Error} ${RedBG} Docker-compose 版本过低,请升级至v2+!${Font}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_node() {
|
check_node() {
|
||||||
npm --version > /dev/null
|
npm --version &> /dev/null
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -e "${Error} ${RedBG} 未安装nodejs!${Font}"
|
echo -e "${Error} ${RedBG} 未安装nodejs!${Font}"
|
||||||
exit 1
|
exit 1
|
||||||
@ -76,7 +81,7 @@ check_node() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
docker_name() {
|
docker_name() {
|
||||||
echo `docker-compose ps | awk '{print $1}' | grep "\-$1\-"`
|
echo `$COMPOSE ps | awk '{print $1}' | grep "\-$1\-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
run_compile() {
|
run_compile() {
|
||||||
@ -272,7 +277,7 @@ if [ $# -gt 0 ]; then
|
|||||||
chmod -R 775 "${cur_path}/docker/mysql/data"
|
chmod -R 775 "${cur_path}/docker/mysql/data"
|
||||||
# 启动容器
|
# 启动容器
|
||||||
[[ "$(arg_get port)" -gt 0 ]] && env_set APP_PORT "$(arg_get port)"
|
[[ "$(arg_get port)" -gt 0 ]] && env_set APP_PORT "$(arg_get port)"
|
||||||
docker-compose up php -d
|
$COMPOSE up php -d
|
||||||
# 安装composer依赖
|
# 安装composer依赖
|
||||||
run_exec php "composer install"
|
run_exec php "composer install"
|
||||||
if [ ! -f "${cur_path}/vendor/autoload.php" ]; then
|
if [ ! -f "${cur_path}/vendor/autoload.php" ]; then
|
||||||
@ -300,7 +305,7 @@ if [ $# -gt 0 ]; then
|
|||||||
run_exec php "php artisan migrate --seed"
|
run_exec php "php artisan migrate --seed"
|
||||||
# 设置初始化密码
|
# 设置初始化密码
|
||||||
res=`run_exec mariadb "sh /etc/mysql/repassword.sh"`
|
res=`run_exec mariadb "sh /etc/mysql/repassword.sh"`
|
||||||
docker-compose up -d
|
$COMPOSE up -d
|
||||||
supervisorctl_restart php
|
supervisorctl_restart php
|
||||||
echo -e "${OK} ${GreenBG} 安装完成 ${Font}"
|
echo -e "${OK} ${GreenBG} 安装完成 ${Font}"
|
||||||
echo -e "地址: http://${GreenBG}127.0.0.1:$(env_get APP_PORT)${Font}"
|
echo -e "地址: http://${GreenBG}127.0.0.1:$(env_get APP_PORT)${Font}"
|
||||||
@ -314,7 +319,7 @@ if [ $# -gt 0 ]; then
|
|||||||
run_exec php "composer update"
|
run_exec php "composer update"
|
||||||
run_exec php "php artisan migrate"
|
run_exec php "php artisan migrate"
|
||||||
supervisorctl_restart php
|
supervisorctl_restart php
|
||||||
docker-compose up -d
|
$COMPOSE up -d
|
||||||
elif [[ "$1" == "uninstall" ]]; then
|
elif [[ "$1" == "uninstall" ]]; then
|
||||||
shift 1
|
shift 1
|
||||||
read -rp "确定要卸载(含:删除容器、数据库、日志)吗?(y/n): " uninstall
|
read -rp "确定要卸载(含:删除容器、数据库、日志)吗?(y/n): " uninstall
|
||||||
@ -328,7 +333,7 @@ if [ $# -gt 0 ]; then
|
|||||||
exit 2
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
docker-compose down
|
$COMPOSE down
|
||||||
rm -rf "./docker/mysql/data"
|
rm -rf "./docker/mysql/data"
|
||||||
rm -rf "./docker/log/supervisor"
|
rm -rf "./docker/log/supervisor"
|
||||||
find "./storage/logs" -name "*.log" | xargs rm -rf
|
find "./storage/logs" -name "*.log" | xargs rm -rf
|
||||||
@ -341,7 +346,7 @@ if [ $# -gt 0 ]; then
|
|||||||
elif [[ "$1" == "port" ]]; then
|
elif [[ "$1" == "port" ]]; then
|
||||||
shift 1
|
shift 1
|
||||||
env_set APP_PORT "$1"
|
env_set APP_PORT "$1"
|
||||||
docker-compose up -d
|
$COMPOSE up -d
|
||||||
echo -e "${OK} ${GreenBG} 修改成功 ${Font}"
|
echo -e "${OK} ${GreenBG} 修改成功 ${Font}"
|
||||||
echo -e "地址: http://${GreenBG}127.0.0.1:$(env_get APP_PORT)${Font}"
|
echo -e "地址: http://${GreenBG}127.0.0.1:$(env_get APP_PORT)${Font}"
|
||||||
elif [[ "$1" == "repassword" ]]; then
|
elif [[ "$1" == "repassword" ]]; then
|
||||||
@ -414,11 +419,11 @@ if [ $# -gt 0 ]; then
|
|||||||
e="./vendor/bin/phpunit $@" && run_exec php "$e"
|
e="./vendor/bin/phpunit $@" && run_exec php "$e"
|
||||||
elif [[ "$1" == "restart" ]]; then
|
elif [[ "$1" == "restart" ]]; then
|
||||||
shift 1
|
shift 1
|
||||||
docker-compose stop "$@"
|
$COMPOSE stop "$@"
|
||||||
docker-compose start "$@"
|
$COMPOSE start "$@"
|
||||||
else
|
else
|
||||||
docker-compose "$@"
|
$COMPOSE "$@"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
docker-compose ps
|
$COMPOSE ps
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "DooTask",
|
"name": "DooTask",
|
||||||
"version": "0.10.39",
|
"version": "0.10.64",
|
||||||
"description": "DooTask is task management system.",
|
"description": "DooTask is task management system.",
|
||||||
"main": "electron.js",
|
"main": "electron.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "DooTask",
|
"name": "DooTask",
|
||||||
"version": "0.10.39",
|
"version": "0.10.64",
|
||||||
"description": "DooTask is task management system.",
|
"description": "DooTask is task management system.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "./cmd dev",
|
"start": "./cmd dev",
|
||||||
|
|||||||
2
public/css/app.css
vendored
2
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/120.js
vendored
2
public/js/build/120.js
vendored
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* html2canvas 1.4.0 <https://html2canvas.hertzen.com>
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
||||||
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
||||||
* Released under MIT License
|
* Released under MIT License
|
||||||
*/
|
*/
|
||||||
|
|||||||
2
public/js/build/153.js
vendored
2
public/js/build/153.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/build/162.js
vendored
1
public/js/build/162.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/206.js
vendored
2
public/js/build/206.js
vendored
File diff suppressed because one or more lines are too long
@ -257,7 +257,7 @@
|
|||||||
/** @license
|
/** @license
|
||||||
*
|
*
|
||||||
* jsPDF - PDF Document creation from JavaScript
|
* jsPDF - PDF Document creation from JavaScript
|
||||||
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
|
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
|
||||||
* CommitID 00000000
|
* CommitID 00000000
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||||||
|
|||||||
1
public/js/build/396.js
vendored
Normal file
1
public/js/build/396.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/js/build/486.js
vendored
2
public/js/build/486.js
vendored
File diff suppressed because one or more lines are too long
@ -257,7 +257,7 @@
|
|||||||
/** @license
|
/** @license
|
||||||
*
|
*
|
||||||
* jsPDF - PDF Document creation from JavaScript
|
* jsPDF - PDF Document creation from JavaScript
|
||||||
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
|
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
|
||||||
* CommitID 00000000
|
* CommitID 00000000
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||||||
|
|||||||
2
public/js/build/494.js
vendored
2
public/js/build/494.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/510.js
vendored
2
public/js/build/510.js
vendored
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* clipboard.js v2.0.8
|
* clipboard.js v2.0.10
|
||||||
* https://clipboardjs.com/
|
* https://clipboardjs.com/
|
||||||
*
|
*
|
||||||
* Licensed MIT © Zeno Rocha
|
* Licensed MIT © Zeno Rocha
|
||||||
|
|||||||
2
public/js/build/528.js
vendored
2
public/js/build/528.js
vendored
File diff suppressed because one or more lines are too long
@ -257,7 +257,7 @@
|
|||||||
/** @license
|
/** @license
|
||||||
*
|
*
|
||||||
* jsPDF - PDF Document creation from JavaScript
|
* jsPDF - PDF Document creation from JavaScript
|
||||||
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
|
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
|
||||||
* CommitID 00000000
|
* CommitID 00000000
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||||||
|
|||||||
2
public/js/build/544.js
vendored
2
public/js/build/544.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/601.js
vendored
2
public/js/build/601.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/662.js
vendored
2
public/js/build/662.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/747.js
vendored
2
public/js/build/747.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/756.js
vendored
2
public/js/build/756.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/762.js
vendored
2
public/js/build/762.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/856.js
vendored
2
public/js/build/856.js
vendored
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
/*! @license DOMPurify 2.3.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.4/LICENSE */
|
/*! @license DOMPurify 2.3.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.6/LICENSE */
|
||||||
|
|||||||
2
public/js/build/862.js
vendored
Normal file
2
public/js/build/862.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* clipboard.js v2.0.8
|
* clipboard.js v2.0.10
|
||||||
* https://clipboardjs.com/
|
* https://clipboardjs.com/
|
||||||
*
|
*
|
||||||
* Licensed MIT © Zeno Rocha
|
* Licensed MIT © Zeno Rocha
|
||||||
2
public/js/build/889.js
vendored
2
public/js/build/889.js
vendored
File diff suppressed because one or more lines are too long
@ -257,7 +257,7 @@
|
|||||||
/** @license
|
/** @license
|
||||||
*
|
*
|
||||||
* jsPDF - PDF Document creation from JavaScript
|
* jsPDF - PDF Document creation from JavaScript
|
||||||
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
|
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
|
||||||
* CommitID 00000000
|
* CommitID 00000000
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||||||
|
|||||||
2
public/js/build/954.js
vendored
2
public/js/build/954.js
vendored
File diff suppressed because one or more lines are too long
@ -257,7 +257,7 @@
|
|||||||
/** @license
|
/** @license
|
||||||
*
|
*
|
||||||
* jsPDF - PDF Document creation from JavaScript
|
* jsPDF - PDF Document creation from JavaScript
|
||||||
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
|
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
|
||||||
* CommitID 00000000
|
* CommitID 00000000
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||||||
|
|||||||
2
public/js/build/984.js
vendored
2
public/js/build/984.js
vendored
File diff suppressed because one or more lines are too long
@ -21,6 +21,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
tocObj.reset()
|
||||||
this.init();
|
this.init();
|
||||||
this.createEditor();
|
this.createEditor();
|
||||||
},
|
},
|
||||||
|
|||||||
4
resources/assets/js/functions/web.js
vendored
4
resources/assets/js/functions/web.js
vendored
@ -102,7 +102,7 @@
|
|||||||
* @returns {*|string}
|
* @returns {*|string}
|
||||||
*/
|
*/
|
||||||
formatTime(date) {
|
formatTime(date) {
|
||||||
let time = Math.round($A.Date(date).getTime() / 1000),
|
let time = $A.Date(date, true),
|
||||||
string = '';
|
string = '';
|
||||||
if ($A.formatDate('Ymd') === $A.formatDate('Ymd', time)) {
|
if ($A.formatDate('Ymd') === $A.formatDate('Ymd', time)) {
|
||||||
string = $A.formatDate('H:i', time)
|
string = $A.formatDate('H:i', time)
|
||||||
@ -160,7 +160,7 @@
|
|||||||
} else if (time < 0) {
|
} else if (time < 0) {
|
||||||
return '-' + this.formatSeconds(time * -1);
|
return '-' + this.formatSeconds(time * -1);
|
||||||
} else if (time == 0) {
|
} else if (time == 0) {
|
||||||
return 0;
|
return 0 + 's';
|
||||||
}
|
}
|
||||||
return this.formatTime(date)
|
return this.formatTime(date)
|
||||||
},
|
},
|
||||||
|
|||||||
@ -114,6 +114,9 @@ export default {
|
|||||||
this.subscribe = null;
|
this.subscribe = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
activated() {
|
||||||
|
this.loginType = 'login'
|
||||||
|
},
|
||||||
deactivated() {
|
deactivated() {
|
||||||
this.loginJump = false;
|
this.loginJump = false;
|
||||||
this.password = "";
|
this.password = "";
|
||||||
|
|||||||
@ -46,6 +46,7 @@
|
|||||||
<div class="time" :title="msgData.created_at">{{$A.formatTime(msgData.created_at)}}</div>
|
<div class="time" :title="msgData.created_at">{{$A.formatTime(msgData.created_at)}}</div>
|
||||||
<Poptip
|
<Poptip
|
||||||
v-if="msgData.send > 1 || dialogType == 'group'"
|
v-if="msgData.send > 1 || dialogType == 'group'"
|
||||||
|
ref="percent"
|
||||||
class="percent"
|
class="percent"
|
||||||
placement="left-end"
|
placement="left-end"
|
||||||
transfer
|
transfer
|
||||||
@ -134,13 +135,13 @@ export default {
|
|||||||
}
|
}
|
||||||
this.msgData._r = true;
|
this.msgData._r = true;
|
||||||
//
|
//
|
||||||
this.$nextTick(() => {
|
setTimeout(() => {
|
||||||
if (!this.$el.offsetParent) {
|
if (!this.$el.offsetParent) {
|
||||||
this.msgData._r = false;
|
this.msgData._r = false;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$store.dispatch("dialogMsgRead", this.msgData);
|
this.$store.dispatch("dialogMsgRead", this.msgData);
|
||||||
})
|
}, 50)
|
||||||
},
|
},
|
||||||
|
|
||||||
popperShow() {
|
popperShow() {
|
||||||
@ -151,6 +152,7 @@ export default {
|
|||||||
},
|
},
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
this.read_list = data;
|
this.read_list = data;
|
||||||
|
this.$refs.percent.updatePopper();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.read_list = [];
|
this.read_list = [];
|
||||||
});
|
});
|
||||||
|
|||||||
@ -238,7 +238,7 @@ export default {
|
|||||||
const {times} = this.addData;
|
const {times} = this.addData;
|
||||||
let temp = $A.date2string(times, "Y-m-d H:i");
|
let temp = $A.date2string(times, "Y-m-d H:i");
|
||||||
if (temp[0] && temp[1]) {
|
if (temp[0] && temp[1]) {
|
||||||
let d = Math.ceil(($A.Date(temp[1]).getTime() - $A.Date(temp[0]).getTime()) / 86400000);
|
let d = Math.ceil(($A.Date(temp[1], true) - $A.Date(temp[0], true)) / 86400);
|
||||||
if (d > 0) {
|
if (d > 0) {
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -261,7 +261,7 @@
|
|||||||
<div @click="openTime" class="time">{{taskDetail.end_at ? cutTime : '--'}}</div>
|
<div @click="openTime" class="time">{{taskDetail.end_at ? cutTime : '--'}}</div>
|
||||||
<template v-if="!taskDetail.complete_at && taskDetail.end_at">
|
<template v-if="!taskDetail.complete_at && taskDetail.end_at">
|
||||||
<Tag v-if="within24Hours(taskDetail.end_at)" color="blue"><i class="taskfont"></i>{{expiresFormat(taskDetail.end_at)}}</Tag>
|
<Tag v-if="within24Hours(taskDetail.end_at)" color="blue"><i class="taskfont"></i>{{expiresFormat(taskDetail.end_at)}}</Tag>
|
||||||
<Tag v-if="taskDetail.overdue" color="red">{{$L('超期未完成')}}</Tag>
|
<Tag v-if="isOverdue(taskDetail)" color="red">{{$L('超期未完成')}}</Tag>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</DatePicker>
|
</DatePicker>
|
||||||
@ -616,8 +616,8 @@ export default {
|
|||||||
|
|
||||||
cutTime() {
|
cutTime() {
|
||||||
const {taskDetail} = this;
|
const {taskDetail} = this;
|
||||||
let start_at = Math.round($A.Date(taskDetail.start_at).getTime() / 1000);
|
let start_at = $A.Date(taskDetail.start_at, true);
|
||||||
let end_at = Math.round($A.Date(taskDetail.end_at).getTime() / 1000);
|
let end_at = $A.Date(taskDetail.end_at, true);
|
||||||
let string = "";
|
let string = "";
|
||||||
if ($A.formatDate('Y/m/d', start_at) == $A.formatDate('Y/m/d', end_at)) {
|
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)
|
string = $A.formatDate('Y/m/d H:i', start_at) + " ~ " + $A.formatDate('H:i', end_at)
|
||||||
@ -725,22 +725,25 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
initLanguage() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
innerHeightListener() {
|
innerHeightListener() {
|
||||||
this.innerHeight = Math.min(1100, window.innerHeight);
|
this.innerHeight = Math.min(1100, window.innerHeight);
|
||||||
},
|
},
|
||||||
|
|
||||||
within24Hours(date) {
|
within24Hours(date) {
|
||||||
return Math.round($A.Date(date).getTime() / 1000) - this.nowTime < 86400
|
return $A.Date(date, true) - this.nowTime < 86400
|
||||||
},
|
},
|
||||||
|
|
||||||
expiresFormat(date) {
|
expiresFormat(date) {
|
||||||
return $A.countDownFormat(date, this.nowTime)
|
return $A.countDownFormat(date, this.nowTime)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isOverdue(taskDetail) {
|
||||||
|
if (taskDetail.overdue) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return $A.Date(taskDetail.end_at, true) < this.nowTime;
|
||||||
|
},
|
||||||
|
|
||||||
onNameKeydown(e) {
|
onNameKeydown(e) {
|
||||||
if (e.keyCode === 83) {
|
if (e.keyCode === 83) {
|
||||||
if (e.metaKey || e.ctrlKey) {
|
if (e.metaKey || e.ctrlKey) {
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</slot>
|
</slot>
|
||||||
<EDropdownMenu slot="dropdown" class="task-menu-more-dropdown">
|
<EDropdownMenu ref="dropdownMenu" slot="dropdown" class="task-menu-more-dropdown">
|
||||||
<li class="task-menu-more-warp" :class="size">
|
<li class="task-menu-more-warp" :class="size">
|
||||||
<ul>
|
<ul>
|
||||||
<EDropdownItem v-if="!flow" class="load-flow" disabled>
|
<EDropdownItem v-if="!flow" class="load-flow" disabled>
|
||||||
@ -218,7 +218,9 @@ export default {
|
|||||||
|
|
||||||
visibleChange(visible) {
|
visibleChange(visible) {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
this.$store.dispatch("getTaskFlow", this.task.id).catch(() => {})
|
this.$store.dispatch("getTaskFlow", this.task.id)
|
||||||
|
.then(this.$refs.dropdownMenu.updatePopper)
|
||||||
|
.catch(this.$refs.dropdownMenu.updatePopper)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -266,7 +266,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
completeAtFormat(date) {
|
completeAtFormat(date) {
|
||||||
let time = Math.round($A.Date(date).getTime() / 1000);
|
let time = $A.Date(date, true);
|
||||||
if ($A.formatDate('Y') === $A.formatDate('Y', time)) {
|
if ($A.formatDate('Y') === $A.formatDate('Y', time)) {
|
||||||
return $A.formatDate('m-d H:i', time)
|
return $A.formatDate('m-d H:i', time)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
16
resources/assets/js/store/actions.js
vendored
16
resources/assets/js/store/actions.js
vendored
@ -74,8 +74,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
params.error = () => {
|
params.error = (xhr, status) => {
|
||||||
reject({data: {}, msg: "System error"})
|
if (window.navigator.onLine === false || (status === 0 && xhr.readyState === 4)) {
|
||||||
|
reject({data: {}, msg: $A.L('网络异常,请稍后再试!')})
|
||||||
|
} else {
|
||||||
|
reject({data: {}, msg: "System error"})
|
||||||
|
}
|
||||||
};
|
};
|
||||||
//
|
//
|
||||||
if (params.websocket === true || params.ws === true) {
|
if (params.websocket === true || params.ws === true) {
|
||||||
@ -2046,7 +2050,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
state.wsReadWaitList = [];
|
state.wsReadWaitList = [];
|
||||||
}, 20);
|
}, 50);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2174,6 +2178,12 @@ export default {
|
|||||||
// 更新最后消息
|
// 更新最后消息
|
||||||
dispatch("updateDialogLastMsg", data);
|
dispatch("updateDialogLastMsg", data);
|
||||||
break;
|
break;
|
||||||
|
case 'readed':
|
||||||
|
// 已读回执
|
||||||
|
if (state.dialogMsgs.find(({id}) => id == data.id)) {
|
||||||
|
dispatch("saveDialogMsg", data)
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
})(msgDetail);
|
})(msgDetail);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -114,8 +114,8 @@
|
|||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
|
||||||
.load-flow-warp {
|
.load-flow-warp {
|
||||||
width: 20px;
|
width: 18px;
|
||||||
height: 20px;
|
height: 18px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
14
resources/assets/sass/pages/page-file.scss
vendored
14
resources/assets/sass/pages/page-file.scss
vendored
@ -485,7 +485,7 @@
|
|||||||
.file-upload-list {
|
.file-upload-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 380px;
|
width: 380px;
|
||||||
padding: 14px 26px 14px 13px;
|
padding: 14px 26px 14px 26px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid #ebeef5;
|
border: 1px solid #ebeef5;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -497,8 +497,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.upload-wrap {
|
.upload-wrap {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-left: 13px;
|
width: 100%;
|
||||||
margin-right: 8px;
|
|
||||||
.title {
|
.title {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@ -516,16 +515,18 @@
|
|||||||
.content {
|
.content {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 21px;
|
line-height: 21px;
|
||||||
margin: 12px -16px 0 0;
|
margin: 12px 0 0;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
max-height: 500px;
|
max-height: 500px;
|
||||||
|
max-width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
> li {
|
> li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 4px 16px 4px 0;
|
padding: 4px 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
.file-name {
|
.file-name {
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
|
padding-right: 16px;
|
||||||
}
|
}
|
||||||
.file-error {
|
.file-error {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@ -533,8 +534,9 @@
|
|||||||
}
|
}
|
||||||
.file-close {
|
.file-close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
font-size: 14px;
|
||||||
top: 7px;
|
top: 7px;
|
||||||
right: 0;
|
right: -1px;
|
||||||
display: none;
|
display: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user