Merge branch 'master' of github.com:kuaifan/dootask into develop

# Conflicts:
#	public/css/app.css
#	public/js/app.js
#	public/js/build/120.js
#	public/js/build/120.js.LICENSE.txt
#	public/js/build/198.js
#	public/js/build/494.js
#	public/js/build/79.js
#	public/js/build/793.js
#	public/js/build/875.js
#	public/js/build/890.js
#	resources/assets/js/components/DrawerOverlay.vue
This commit is contained in:
kuaifan 2022-01-17 17:03:50 +08:00
commit 1abd78305f
54 changed files with 1093 additions and 307 deletions

View File

@ -725,7 +725,7 @@ class Base
public static function getHost($var = '') public static function getHost($var = '')
{ {
if (empty($var)) { if (empty($var)) {
$var = url("/"); $var = self::url();
} }
$arr = parse_url($var); $arr = parse_url($var);
return $arr['host']; return $arr['host'];
@ -756,7 +756,7 @@ class Base
) { ) {
return $str; return $str;
} else { } else {
return Base::leftDelete(url($str), "http://localhost"); return self::url($str);
} }
} }
@ -773,8 +773,35 @@ class Base
} }
return $str; return $str;
} }
$find = url(''); return Base::leftDelete($str, self::url() . '/');
return Base::leftDelete($str, $find . '/'); }
/**
* 获取url
* @param $path
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\UrlGenerator|string
*/
public static function url($path = '')
{
try {
$url = url($path);
if (str_starts_with($url, "http://localhost/")) {
$url = "http://localhost:" . env("APP_PORT", "80") . "/" . substr($url, 17);
}
} catch (\Throwable) {
$url = self::getSchemeAndHost() . "/" . $path;
}
return $url;
}
/**
* 获取主地址
* @return string http://127.0.0.1:8080
*/
public static function getSchemeAndHost()
{
$scheme = isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://';
return $scheme.($_SERVER['HTTP_HOST'] ?? '');
} }
/** /**

55
cmd
View File

@ -31,6 +31,15 @@ rand() {
echo $(($num%$max+$min)) echo $(($num%$max+$min))
} }
rand_string() {
local lan=$1
if [[ `uname` == 'Linux' ]]; then
echo "$(date +%s%N | md5sum | cut -c 1-${lan})"
else
echo "$(docker run -it --rm alpine sh -c "date +%s%N | md5sum | cut -c 1-${lan}")"
fi
}
supervisorctl_restart() { supervisorctl_restart() {
local RES=`run_exec php "supervisorctl update $1"` local RES=`run_exec php "supervisorctl update $1"`
if [ -z "$RES" ]; then if [ -z "$RES" ]; then
@ -117,10 +126,10 @@ run_exec() {
echo -e "${Error} ${RedBG} 没有找到 $container 容器! ${Font}" echo -e "${Error} ${RedBG} 没有找到 $container 容器! ${Font}"
exit 1 exit 1
fi fi
if [ "$container" = "mariadb" ] || [ "$container" = "nginx" ] || [ "$container" = "redis" ]; then if [ "$container" = "php" ]; then
docker exec -it "$name" /bin/sh -c "$cmd"
else
docker exec -it "$name" /bin/bash -c "$cmd" docker exec -it "$name" /bin/bash -c "$cmd"
else
docker exec -it "$name" /bin/sh -c "$cmd"
fi fi
} }
@ -178,8 +187,11 @@ env_set() {
if [ -z "$exist" ]; then if [ -z "$exist" ]; then
echo "$key=$val" >> $cur_path/.env echo "$key=$val" >> $cur_path/.env
else else
command="sed -i '/^$key=/c\\$key=$val' /www/.env" if [[ `uname` == 'Linux' ]]; then
docker run -it --rm -v ${cur_path}:/www alpine sh -c "$command" sed -i "/^${key}=/c\\${key}=${val}" /www/.env
else
docker run -it --rm -v ${cur_path}:/www alpine sh -c "sed -i "/^${key}=/c\\${key}=${val}" /www/.env"
fi
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo -e "${Error} ${RedBG} 设置env参数失败${Font}" echo -e "${Error} ${RedBG} 设置env参数失败${Font}"
exit 1 exit 1
@ -192,10 +204,10 @@ env_init() {
cp .env.docker .env cp .env.docker .env
fi fi
if [ -z "$(env_get DB_ROOT_PASSWORD)" ]; then if [ -z "$(env_get DB_ROOT_PASSWORD)" ]; then
env_set DB_ROOT_PASSWORD "$(docker run -it --rm alpine sh -c "date +%s%N | md5sum | cut -c 1-16")" env_set DB_ROOT_PASSWORD "$(rand_string 16)"
fi fi
if [ -z "$(env_get APP_ID)" ]; then if [ -z "$(env_get APP_ID)" ]; then
env_set APP_ID "$(docker run -it --rm alpine sh -c "date +%s%N | md5sum | cut -c 1-6")" env_set APP_ID "$(rand_string 6)"
fi fi
if [ -z "$(env_get APP_IPPR)" ]; then if [ -z "$(env_get APP_IPPR)" ]; then
env_set APP_IPPR "10.$(rand 50 100).$(rand 100 200)" env_set APP_IPPR "10.$(rand 50 100).$(rand 100 200)"
@ -207,16 +219,28 @@ arg_get() {
local value="" local value=""
for var in $cur_arg; do for var in $cur_arg; do
if [[ "$find" == "y" ]]; then if [[ "$find" == "y" ]]; then
value=$var if [[ ! $var =~ "--" ]]; then
value=$var
fi
break break
fi fi
if [[ "--$1" == "$var" ]] || [[ "-$1" == "$var" ]]; then if [[ "--$1" == "$var" ]] || [[ "-$1" == "$var" ]]; then
find="y" find="y"
value="yes"
fi fi
done done
echo $value echo $value
} }
is_arm() {
local get_arch=`arch`
if [[ $get_arch =~ "aarch" ]] || [[ $get_arch =~ "arm" ]]; then
echo "yes"
else
echo "no"
fi
}
#################################################################################### ####################################################################################
#################################################################################### ####################################################################################
#################################################################################### ####################################################################################
@ -229,6 +253,11 @@ fi
if [ $# -gt 0 ]; then if [ $# -gt 0 ]; then
if [[ "$1" == "init" ]] || [[ "$1" == "install" ]]; then if [[ "$1" == "init" ]] || [[ "$1" == "install" ]]; then
shift 1 shift 1
# 判断架构
if [[ "$(is_arm)" == "yes" ]] && [[ -z "$(arg_get force)" ]]; then
echo -e "${Error} ${RedBG}暂不支持arm架构强制安装请使用./cmd install --force${Font}"
exit 1
fi
# 初始化文件 # 初始化文件
rm -rf composer.lock rm -rf composer.lock
rm -rf package-lock.json rm -rf package-lock.json
@ -302,9 +331,9 @@ if [ $# -gt 0 ]; then
echo -e "${OK} ${GreenBG} 卸载完成 ${Font}" echo -e "${OK} ${GreenBG} 卸载完成 ${Font}"
elif [[ "$1" == "reinstall" ]]; then elif [[ "$1" == "reinstall" ]]; then
shift 1 shift 1
./cmd uninstall ./cmd uninstall $@
sleep 3 sleep 3
./cmd install ./cmd install $@
elif [[ "$1" == "port" ]]; then elif [[ "$1" == "port" ]]; then
shift 1 shift 1
env_set APP_PORT "$1" env_set APP_PORT "$1"
@ -367,10 +396,10 @@ if [ $# -gt 0 ]; then
elif [[ "$1" == "composer" ]]; then elif [[ "$1" == "composer" ]]; then
shift 1 shift 1
e="composer $@" && run_exec php "$e" e="composer $@" && run_exec php "$e"
elif [[ "$1" == "super" ]]; then elif [[ "$1" == "service" ]]; then
shift 1 shift 1
supervisorctl_restart "$@" e="service $@" && run_exec php "$e"
elif [[ "$1" == "supervisorctl" ]]; then elif [[ "$1" == "super" ]] || [[ "$1" == "supervisorctl" ]]; then
shift 1 shift 1
e="supervisorctl $@" && run_exec php "$e" e="supervisorctl $@" && run_exec php "$e"
elif [[ "$1" == "models" ]]; then elif [[ "$1" == "models" ]]; then

View File

@ -18,6 +18,8 @@ class DatabaseSeeder extends Seeder
$this->call(FilesTableSeeder::class); $this->call(FilesTableSeeder::class);
$this->call(FileUsersTableSeeder::class); $this->call(FileUsersTableSeeder::class);
$this->call(ProjectColumnsTableSeeder::class); $this->call(ProjectColumnsTableSeeder::class);
$this->call(ProjectFlowItemsTableSeeder::class);
$this->call(ProjectFlowsTableSeeder::class);
$this->call(ProjectLogsTableSeeder::class); $this->call(ProjectLogsTableSeeder::class);
$this->call(ProjectTaskContentsTableSeeder::class); $this->call(ProjectTaskContentsTableSeeder::class);
$this->call(ProjectTaskUsersTableSeeder::class); $this->call(ProjectTaskUsersTableSeeder::class);

View File

@ -0,0 +1,388 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class ProjectFlowItemsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
if (\DB::table('project_flow_items')->count() > 0) {
return;
}
\DB::table('project_flow_items')->insert(array (
0 =>
array (
'id' => 1,
'project_id' => 2,
'flow_id' => 1,
'name' => '待处理',
'status' => 'start',
'turns' => '[1,2,3,4]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 0,
'created_at' => '2022-01-15 23:43:15',
'updated_at' => '2022-01-15 23:43:15',
),
1 =>
array (
'id' => 2,
'project_id' => 2,
'flow_id' => 1,
'name' => '进行中',
'status' => 'progress',
'turns' => '[1,2,3,4]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 1,
'created_at' => '2022-01-15 23:43:15',
'updated_at' => '2022-01-15 23:43:15',
),
2 =>
array (
'id' => 3,
'project_id' => 2,
'flow_id' => 1,
'name' => '已完成',
'status' => 'end',
'turns' => '[1,2,3,4]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 2,
'created_at' => '2022-01-15 23:43:15',
'updated_at' => '2022-01-15 23:43:15',
),
3 =>
array (
'id' => 4,
'project_id' => 2,
'flow_id' => 1,
'name' => '已取消',
'status' => 'end',
'turns' => '[1,2,3,4]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 3,
'created_at' => '2022-01-15 23:43:15',
'updated_at' => '2022-01-15 23:43:15',
),
4 =>
array (
'id' => 5,
'project_id' => 3,
'flow_id' => 2,
'name' => '待处理',
'status' => 'start',
'turns' => '[5,6,7,8]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 0,
'created_at' => '2022-01-15 23:43:23',
'updated_at' => '2022-01-15 23:43:23',
),
5 =>
array (
'id' => 6,
'project_id' => 3,
'flow_id' => 2,
'name' => '进行中',
'status' => 'progress',
'turns' => '[5,6,7,8]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 1,
'created_at' => '2022-01-15 23:43:23',
'updated_at' => '2022-01-15 23:43:23',
),
6 =>
array (
'id' => 7,
'project_id' => 3,
'flow_id' => 2,
'name' => '已完成',
'status' => 'end',
'turns' => '[5,6,7,8]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 2,
'created_at' => '2022-01-15 23:43:23',
'updated_at' => '2022-01-15 23:43:23',
),
7 =>
array (
'id' => 8,
'project_id' => 3,
'flow_id' => 2,
'name' => '已取消',
'status' => 'end',
'turns' => '[5,6,7,8]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 3,
'created_at' => '2022-01-15 23:43:23',
'updated_at' => '2022-01-15 23:43:23',
),
8 =>
array (
'id' => 9,
'project_id' => 4,
'flow_id' => 3,
'name' => '待处理',
'status' => 'start',
'turns' => '[9,10,11,12]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 0,
'created_at' => '2022-01-15 23:43:28',
'updated_at' => '2022-01-15 23:43:28',
),
9 =>
array (
'id' => 10,
'project_id' => 4,
'flow_id' => 3,
'name' => '进行中',
'status' => 'progress',
'turns' => '[9,10,11,12]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 1,
'created_at' => '2022-01-15 23:43:28',
'updated_at' => '2022-01-15 23:43:28',
),
10 =>
array (
'id' => 11,
'project_id' => 4,
'flow_id' => 3,
'name' => '已完成',
'status' => 'end',
'turns' => '[9,10,11,12]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 2,
'created_at' => '2022-01-15 23:43:28',
'updated_at' => '2022-01-15 23:43:28',
),
11 =>
array (
'id' => 12,
'project_id' => 4,
'flow_id' => 3,
'name' => '已取消',
'status' => 'end',
'turns' => '[9,10,11,12]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 3,
'created_at' => '2022-01-15 23:43:28',
'updated_at' => '2022-01-15 23:43:28',
),
12 =>
array (
'id' => 13,
'project_id' => 5,
'flow_id' => 4,
'name' => '待处理',
'status' => 'start',
'turns' => '[13,14,15,16]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 0,
'created_at' => '2022-01-15 23:43:34',
'updated_at' => '2022-01-15 23:43:34',
),
13 =>
array (
'id' => 14,
'project_id' => 5,
'flow_id' => 4,
'name' => '进行中',
'status' => 'progress',
'turns' => '[13,14,15,16]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 1,
'created_at' => '2022-01-15 23:43:34',
'updated_at' => '2022-01-15 23:43:34',
),
14 =>
array (
'id' => 15,
'project_id' => 5,
'flow_id' => 4,
'name' => '已完成',
'status' => 'end',
'turns' => '[13,14,15,16]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 2,
'created_at' => '2022-01-15 23:43:34',
'updated_at' => '2022-01-15 23:43:34',
),
15 =>
array (
'id' => 16,
'project_id' => 5,
'flow_id' => 4,
'name' => '已取消',
'status' => 'end',
'turns' => '[13,14,15,16]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 3,
'created_at' => '2022-01-15 23:43:34',
'updated_at' => '2022-01-15 23:43:34',
),
16 =>
array (
'id' => 17,
'project_id' => 6,
'flow_id' => 5,
'name' => '待处理',
'status' => 'start',
'turns' => '[17,18,19,20]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 0,
'created_at' => '2022-01-15 23:43:40',
'updated_at' => '2022-01-15 23:43:40',
),
17 =>
array (
'id' => 18,
'project_id' => 6,
'flow_id' => 5,
'name' => '进行中',
'status' => 'progress',
'turns' => '[17,18,19,20]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 1,
'created_at' => '2022-01-15 23:43:40',
'updated_at' => '2022-01-15 23:43:40',
),
18 =>
array (
'id' => 19,
'project_id' => 6,
'flow_id' => 5,
'name' => '已完成',
'status' => 'end',
'turns' => '[17,18,19,20]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 2,
'created_at' => '2022-01-15 23:43:40',
'updated_at' => '2022-01-15 23:43:40',
),
19 =>
array (
'id' => 20,
'project_id' => 6,
'flow_id' => 5,
'name' => '已取消',
'status' => 'end',
'turns' => '[17,18,19,20]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 3,
'created_at' => '2022-01-15 23:43:40',
'updated_at' => '2022-01-15 23:43:40',
),
20 =>
array (
'id' => 21,
'project_id' => 7,
'flow_id' => 6,
'name' => '待处理',
'status' => 'start',
'turns' => '[21,22,23,24]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 0,
'created_at' => '2022-01-15 23:43:45',
'updated_at' => '2022-01-15 23:43:45',
),
21 =>
array (
'id' => 22,
'project_id' => 7,
'flow_id' => 6,
'name' => '进行中',
'status' => 'progress',
'turns' => '[21,22,23,24]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 1,
'created_at' => '2022-01-15 23:43:45',
'updated_at' => '2022-01-15 23:43:45',
),
22 =>
array (
'id' => 23,
'project_id' => 7,
'flow_id' => 6,
'name' => '已完成',
'status' => 'end',
'turns' => '[21,22,23,24]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 2,
'created_at' => '2022-01-15 23:43:45',
'updated_at' => '2022-01-15 23:43:45',
),
23 =>
array (
'id' => 24,
'project_id' => 7,
'flow_id' => 6,
'name' => '已取消',
'status' => 'end',
'turns' => '[21,22,23,24]',
'userids' => '[]',
'usertype' => 'add',
'userlimit' => 0,
'sort' => 3,
'created_at' => '2022-01-15 23:43:45',
'updated_at' => '2022-01-15 23:43:45',
),
));
}
}

View File

@ -0,0 +1,76 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class ProjectFlowsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
if (\DB::table('project_flows')->count() > 0) {
return;
}
\DB::table('project_flows')->insert(array (
0 =>
array (
'id' => 1,
'project_id' => 2,
'name' => 'Default',
'created_at' => '2022-01-15 23:43:15',
'updated_at' => '2022-01-15 23:43:15',
),
1 =>
array (
'id' => 2,
'project_id' => 3,
'name' => 'Default',
'created_at' => '2022-01-15 23:43:23',
'updated_at' => '2022-01-15 23:43:23',
),
2 =>
array (
'id' => 3,
'project_id' => 4,
'name' => 'Default',
'created_at' => '2022-01-15 23:43:28',
'updated_at' => '2022-01-15 23:43:28',
),
3 =>
array (
'id' => 4,
'project_id' => 5,
'name' => 'Default',
'created_at' => '2022-01-15 23:43:34',
'updated_at' => '2022-01-15 23:43:34',
),
4 =>
array (
'id' => 5,
'project_id' => 6,
'name' => 'Default',
'created_at' => '2022-01-15 23:43:40',
'updated_at' => '2022-01-15 23:43:40',
),
5 =>
array (
'id' => 6,
'project_id' => 7,
'name' => 'Default',
'created_at' => '2022-01-15 23:43:45',
'updated_at' => '2022-01-15 23:43:45',
),
));
}
}

View File

@ -28,6 +28,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 2, 'project_id' => 2,
'column_id' => 2, 'column_id' => 2,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 1,
'flow_item_name' => '待处理',
'name' => '说明:将进度分成多级 'name' => '说明:将进度分成多级
每张卡片为一个项目任务,标签表示任务状况 每张卡片为一个项目任务,标签表示任务状况
通过将卡片拖至不同的进度列表下,来表示各项目进度', 通过将卡片拖至不同的进度列表下,来表示各项目进度',
@ -54,6 +56,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 2, 'project_id' => 2,
'column_id' => 2, 'column_id' => 2,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 1,
'flow_item_name' => '待处理',
'name' => '官网项目', 'name' => '官网项目',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -78,6 +82,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 2, 'project_id' => 2,
'column_id' => 2, 'column_id' => 2,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 1,
'flow_item_name' => '待处理',
'name' => '新增职位需求', 'name' => '新增职位需求',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -102,6 +108,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 2, 'project_id' => 2,
'column_id' => 2, 'column_id' => 2,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 1,
'flow_item_name' => '待处理',
'name' => '更新公司简介', 'name' => '更新公司简介',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -126,6 +134,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 2, 'project_id' => 2,
'column_id' => 3, 'column_id' => 3,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 1,
'flow_item_name' => '待处理',
'name' => '官网项目四期', 'name' => '官网项目四期',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -150,6 +160,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 2, 'project_id' => 2,
'column_id' => 4, 'column_id' => 4,
'dialog_id' => 16, 'dialog_id' => 16,
'flow_item_id' => 1,
'flow_item_name' => '待处理',
'name' => '官网项目三期', 'name' => '官网项目三期',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -174,6 +186,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 2, 'project_id' => 2,
'column_id' => 5, 'column_id' => 5,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 1,
'flow_item_name' => '待处理',
'name' => '官网项目二期', 'name' => '官网项目二期',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -198,6 +212,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 2, 'project_id' => 2,
'column_id' => 6, 'column_id' => 6,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 3,
'flow_item_name' => '已完成',
'name' => '官网项目一期', 'name' => '官网项目一期',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -222,6 +238,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 7, 'column_id' => 7,
'dialog_id' => 18, 'dialog_id' => 18,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => '免费高品质的Sketch资源', 'name' => '免费高品质的Sketch资源',
'color' => '', 'color' => '',
'desc' => 'https://sketchrepo.com/', 'desc' => 'https://sketchrepo.com/',
@ -246,6 +264,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 7, 'column_id' => 7,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => '免费高品质的PSD资源', 'name' => '免费高品质的PSD资源',
'color' => '', 'color' => '',
'desc' => 'https://psdrepo.com/', 'desc' => 'https://psdrepo.com/',
@ -270,6 +290,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 7, 'column_id' => 7,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => '免费高清灵感图片网(偏文艺)', 'name' => '免费高清灵感图片网(偏文艺)',
'color' => '', 'color' => '',
'desc' => 'https://magdeleine.co/', 'desc' => 'https://magdeleine.co/',
@ -294,6 +316,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 7, 'column_id' => 7,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => '每天发现充满灵感且美丽的图片', 'name' => '每天发现充满灵感且美丽的图片',
'color' => '', 'color' => '',
'desc' => 'https://weheartit.com/', 'desc' => 'https://weheartit.com/',
@ -318,6 +342,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 8, 'column_id' => 8,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => '花瓣网:设计师寻找灵感的天堂', 'name' => '花瓣网:设计师寻找灵感的天堂',
'color' => '', 'color' => '',
'desc' => 'https://huaban.com/', 'desc' => 'https://huaban.com/',
@ -342,6 +368,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 8, 'column_id' => 8,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'WallHaven高清壁纸图片搜索引擎', 'name' => 'WallHaven高清壁纸图片搜索引擎',
'color' => '', 'color' => '',
'desc' => 'https://wallhaven.typepad.com/', 'desc' => 'https://wallhaven.typepad.com/',
@ -366,6 +394,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 8, 'column_id' => 8,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'Pexels免费高品质图片 可商用', 'name' => 'Pexels免费高品质图片 可商用',
'color' => '', 'color' => '',
'desc' => 'https://www.pexels.com/', 'desc' => 'https://www.pexels.com/',
@ -390,6 +420,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 9, 'column_id' => 9,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'RetinizeiOS切图神器', 'name' => 'RetinizeiOS切图神器',
'color' => '', 'color' => '',
'desc' => 'http://retinize.it/', 'desc' => 'http://retinize.it/',
@ -414,6 +446,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 9, 'column_id' => 9,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'GuideGuide一款PS参考线插件', 'name' => 'GuideGuide一款PS参考线插件',
'color' => '', 'color' => '',
'desc' => 'https://guideguide.me/photoshop/', 'desc' => 'https://guideguide.me/photoshop/',
@ -438,6 +472,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 9, 'column_id' => 9,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'Assistor PS一个功能强大的PS辅助工具', 'name' => 'Assistor PS一个功能强大的PS辅助工具',
'color' => '', 'color' => '',
'desc' => 'http://wit-web.azurewebsites.net/assistor/download', 'desc' => 'http://wit-web.azurewebsites.net/assistor/download',
@ -462,6 +498,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 10, 'column_id' => 10,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'Fontello图标字体生成器', 'name' => 'Fontello图标字体生成器',
'color' => '', 'color' => '',
'desc' => 'http://fontello.com/', 'desc' => 'http://fontello.com/',
@ -486,6 +524,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 10, 'column_id' => 10,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'inconfont: 免费提供高度可辨识符号图标', 'name' => 'inconfont: 免费提供高度可辨识符号图标',
'color' => '', 'color' => '',
'desc' => 'https://www.iconfont.cn/', 'desc' => 'https://www.iconfont.cn/',
@ -510,6 +550,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 10, 'column_id' => 10,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'The Noun Project免费提供高度可辨识符号图标', 'name' => 'The Noun Project免费提供高度可辨识符号图标',
'color' => '', 'color' => '',
'desc' => 'https://thenounproject.com/', 'desc' => 'https://thenounproject.com/',
@ -534,6 +576,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 10, 'column_id' => 10,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'EasyIcon免费图标搜索和下载平台', 'name' => 'EasyIcon免费图标搜索和下载平台',
'color' => '', 'color' => '',
'desc' => 'https://www.easyicon.net/', 'desc' => 'https://www.easyicon.net/',
@ -558,6 +602,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 10, 'column_id' => 10,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'Icon Deposit一个奇妙的图标下载站', 'name' => 'Icon Deposit一个奇妙的图标下载站',
'color' => '', 'color' => '',
'desc' => 'https://www.icondeposit.com/', 'desc' => 'https://www.icondeposit.com/',
@ -582,6 +628,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 10, 'column_id' => 10,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'iConifyMac平台的苹果应用图标自动化生成工具', 'name' => 'iConifyMac平台的苹果应用图标自动化生成工具',
'color' => '', 'color' => '',
'desc' => 'https://iconify.net/', 'desc' => 'https://iconify.net/',
@ -606,6 +654,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 11, 'column_id' => 11,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'Logaster教你在线几分钟内搞定专业的LOGO', 'name' => 'Logaster教你在线几分钟内搞定专业的LOGO',
'color' => '', 'color' => '',
'desc' => '设计https://www.logaster.cn/', 'desc' => '设计https://www.logaster.cn/',
@ -630,6 +680,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 11, 'column_id' => 11,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'LogoLounge国际知名的LOGO设计权威网站', 'name' => 'LogoLounge国际知名的LOGO设计权威网站',
'color' => '', 'color' => '',
'desc' => 'https://www.logolounge.com/', 'desc' => 'https://www.logolounge.com/',
@ -654,6 +706,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 11, 'column_id' => 11,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'LogoMoose一个优秀的logo素材站点', 'name' => 'LogoMoose一个优秀的logo素材站点',
'color' => '', 'color' => '',
'desc' => 'https://www.logomoose.com/', 'desc' => 'https://www.logomoose.com/',
@ -678,6 +732,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 11, 'column_id' => 11,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'LOGOED一个展示Logo设计的博客', 'name' => 'LOGOED一个展示Logo设计的博客',
'color' => '', 'color' => '',
'desc' => 'http://www.logoed.co.uk/page/2/', 'desc' => 'http://www.logoed.co.uk/page/2/',
@ -702,6 +758,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 11, 'column_id' => 11,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'Logo of the Day汇集世界各地优秀LOGO作品的站点', 'name' => 'Logo of the Day汇集世界各地优秀LOGO作品的站点',
'color' => '', 'color' => '',
'desc' => 'https://logooftheday.com/', 'desc' => 'https://logooftheday.com/',
@ -726,6 +784,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 2, 'project_id' => 2,
'column_id' => 5, 'column_id' => 5,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 1,
'flow_item_name' => '待处理',
'name' => 'asdasdad1111', 'name' => 'asdasdad1111',
'color' => '', 'color' => '',
'desc' => '7777777', 'desc' => '7777777',
@ -750,6 +810,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 2, 'project_id' => 2,
'column_id' => 5, 'column_id' => 5,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 1,
'flow_item_name' => '待处理',
'name' => 'hjhjhjjh', 'name' => 'hjhjhjjh',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -774,6 +836,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 11, 'column_id' => 11,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'Logo of the Day汇集世界各地优秀LOGO作品的站点', 'name' => 'Logo of the Day汇集世界各地优秀LOGO作品的站点',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -798,6 +862,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 11, 'column_id' => 11,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'LogoDesignLoveLogo设计技巧分享网', 'name' => 'LogoDesignLoveLogo设计技巧分享网',
'color' => '', 'color' => '',
'desc' => 'LogoDesignLoveLogo设计技巧分享网', 'desc' => 'LogoDesignLoveLogo设计技巧分享网',
@ -822,6 +888,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 11, 'column_id' => 11,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'LogoDesignLoveLogo设计技巧分享网', 'name' => 'LogoDesignLoveLogo设计技巧分享网',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -846,6 +914,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 12, 'column_id' => 12,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'Coolors自动生成配色色板的小工具', 'name' => 'Coolors自动生成配色色板的小工具',
'color' => '', 'color' => '',
'desc' => 'https://coolors.co/', 'desc' => 'https://coolors.co/',
@ -870,6 +940,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 12, 'column_id' => 12,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'Material PaletteMaterial Design专用在线配色工具', 'name' => 'Material PaletteMaterial Design专用在线配色工具',
'color' => '', 'color' => '',
'desc' => 'https://www.materialpalette.com/', 'desc' => 'https://www.materialpalette.com/',
@ -894,6 +966,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 12, 'column_id' => 12,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'Web安全色WEB设计、开发中常用的安全颜色', 'name' => 'Web安全色WEB设计、开发中常用的安全颜色',
'color' => '', 'color' => '',
'desc' => 'https://www.bootcss.com/p/websafecolors/', 'desc' => 'https://www.bootcss.com/p/websafecolors/',
@ -918,6 +992,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 12, 'column_id' => 12,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'ColorZilla火狐浏览器网页取色器插件', 'name' => 'ColorZilla火狐浏览器网页取色器插件',
'color' => '', 'color' => '',
'desc' => 'https://www.colorzilla.com/', 'desc' => 'https://www.colorzilla.com/',
@ -942,6 +1018,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 12, 'column_id' => 12,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'Color Palette Generator图片配色工具', 'name' => 'Color Palette Generator图片配色工具',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -966,6 +1044,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 12, 'column_id' => 12,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'inconfont: 免费提供高度可辨识符号图标', 'name' => 'inconfont: 免费提供高度可辨识符号图标',
'color' => '', 'color' => '',
'desc' => 'https://www.iconfont.cn/', 'desc' => 'https://www.iconfont.cn/',
@ -990,6 +1070,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 12, 'column_id' => 12,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'inconfont: 免费提供高度可辨识符号图标https://www.iconfont.cn/', 'name' => 'inconfont: 免费提供高度可辨识符号图标https://www.iconfont.cn/',
'color' => '', 'color' => '',
'desc' => 'https://www.iconfont.cn/', 'desc' => 'https://www.iconfont.cn/',
@ -1014,6 +1096,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 3, 'project_id' => 3,
'column_id' => 12, 'column_id' => 12,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 5,
'flow_item_name' => '待处理',
'name' => 'https://www.iconfont.cn/', 'name' => 'https://www.iconfont.cn/',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1038,6 +1122,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 13, 'column_id' => 13,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '将收集箱的事务进行判断。要立即执行进入Q2列表。非立即执行判断——1.不做删掉、2.稍晚再做进入「稍后做」、3.可做可不做的任务或可能有用的资源进入「Mark」列表', 'name' => '将收集箱的事务进行判断。要立即执行进入Q2列表。非立即执行判断——1.不做删掉、2.稍晚再做进入「稍后做」、3.可做可不做的任务或可能有用的资源进入「Mark」列表',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1062,6 +1148,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 13, 'column_id' => 13,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '2分钟内能做完贴上2分钟标签进入「2分钟速战」列表。2分钟以上做完的事务进入Q3', 'name' => '2分钟内能做完贴上2分钟标签进入「2分钟速战」列表。2分钟以上做完的事务进入Q3',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1086,6 +1174,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 13, 'column_id' => 13,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '判断能否一步做完能进入Q4不能打上多步标签进入「项目清单」或将多步骤任务分解成多个一步做完任务进入Q4。', 'name' => '判断能否一步做完能进入Q4不能打上多步标签进入「项目清单」或将多步骤任务分解成多个一步做完任务进入Q4。',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1110,6 +1200,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 13, 'column_id' => 13,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '如果自己做,打上自己做标签(进入「执行清单」);如果别人做,打上别人做标签(进入「等待清单」)。', 'name' => '如果自己做,打上自己做标签(进入「执行清单」);如果别人做,打上别人做标签(进入「等待清单」)。',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1134,6 +1226,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 2, 'project_id' => 2,
'column_id' => 2, 'column_id' => 2,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 1,
'flow_item_name' => '待处理',
'name' => '❓❗ 说明:将进度分成多级 'name' => '❓❗ 说明:将进度分成多级
每张卡片为一个项目任务,标签表示任务状况 每张卡片为一个项目任务,标签表示任务状况
@ -1162,6 +1256,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 13, 'column_id' => 13,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '每天晚上复查整套流程', 'name' => '每天晚上复查整套流程',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1186,6 +1282,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 13, 'column_id' => 13,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '1.检查「收集箱」是否清空。', 'name' => '1.检查「收集箱」是否清空。',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1210,6 +1308,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 13, 'column_id' => 13,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '2.检查「Mark」是否有条目需要执行转化成行动或项目。', 'name' => '2.检查「Mark」是否有条目需要执行转化成行动或项目。',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1234,6 +1334,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 13, 'column_id' => 13,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '3.检查「项目清单」了解项目进度。', 'name' => '3.检查「项目清单」了解项目进度。',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1258,6 +1360,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 13, 'column_id' => 13,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '4.检查「等待清单」是否有条目需要转化成行动,也就是催促。', 'name' => '4.检查「等待清单」是否有条目需要转化成行动,也就是催促。',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1282,6 +1386,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 13, 'column_id' => 13,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '5.检查各清单是否有已完成,完成的、已作废的卡片,立刻删除。', 'name' => '5.检查各清单是否有已完成,完成的、已作废的卡片,立刻删除。',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1306,6 +1412,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 14, 'column_id' => 14,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '任何事务或信息,先以最简单的方式记录到“收集箱”。然后判断,贴上标签后,拖动到相应列表里', 'name' => '任何事务或信息,先以最简单的方式记录到“收集箱”。然后判断,贴上标签后,拖动到相应列表里',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1330,6 +1438,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 15, 'column_id' => 15,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '优先级1立即去做的事', 'name' => '优先级1立即去做的事',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1354,6 +1464,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 14, 'column_id' => 14,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '任何事务或信息,先以最简单的方式记录到“收集箱”。然后判断,贴上标签后,拖动到相应列表里', 'name' => '任何事务或信息,先以最简单的方式记录到“收集箱”。然后判断,贴上标签后,拖动到相应列表里',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1378,6 +1490,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 16, 'column_id' => 16,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '优先级2主要的执行清单', 'name' => '优先级2主要的执行清单',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1402,6 +1516,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 17, 'column_id' => 17,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '优先级3存放需要多步骤做的事持续追踪', 'name' => '优先级3存放需要多步骤做的事持续追踪',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1426,6 +1542,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 17, 'column_id' => 17,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '可以为这个多步骤项目单独建一个项目,并把项目的链接放到卡片的详情页里,点击就能跳转进去。', 'name' => '可以为这个多步骤项目单独建一个项目,并把项目的链接放到卡片的详情页里,点击就能跳转进去。',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1450,6 +1568,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 17, 'column_id' => 17,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '活动策划', 'name' => '活动策划',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1474,6 +1594,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 16, 'column_id' => 16,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '填问卷', 'name' => '填问卷',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1498,6 +1620,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 18, 'column_id' => 18,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '存放等待协同的事', 'name' => '存放等待协同的事',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1522,6 +1646,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 18, 'column_id' => 18,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '设计稿反馈', 'name' => '设计稿反馈',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1546,6 +1672,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 18, 'column_id' => 18,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '存放等待协同的事', 'name' => '存放等待协同的事',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1570,6 +1698,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 19, 'column_id' => 19,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '存放稍后做的任务', 'name' => '存放稍后做的任务',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1594,6 +1724,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 19, 'column_id' => 19,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '阅实习生简历', 'name' => '阅实习生简历',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1618,6 +1750,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 20, 'column_id' => 20,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '存放可做可不做的任务,以及各种可能用到的资源', 'name' => '存放可做可不做的任务,以及各种可能用到的资源',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1642,6 +1776,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 4, 'project_id' => 4,
'column_id' => 20, 'column_id' => 20,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 9,
'flow_item_name' => '待处理',
'name' => '团建KTV', 'name' => '团建KTV',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1666,6 +1802,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 5, 'project_id' => 5,
'column_id' => 21, 'column_id' => 21,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 13,
'flow_item_name' => '待处理',
'name' => '产品新需求', 'name' => '产品新需求',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1690,6 +1828,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 5, 'project_id' => 5,
'column_id' => 22, 'column_id' => 22,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 13,
'flow_item_name' => '待处理',
'name' => '需要调研的需求', 'name' => '需要调研的需求',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1714,6 +1854,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 5, 'project_id' => 5,
'column_id' => 23, 'column_id' => 23,
'dialog_id' => 17, 'dialog_id' => 17,
'flow_item_id' => 13,
'flow_item_name' => '待处理',
'name' => '进入交互设计的需求', 'name' => '进入交互设计的需求',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1738,6 +1880,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 5, 'project_id' => 5,
'column_id' => 25, 'column_id' => 25,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 13,
'flow_item_name' => '待处理',
'name' => '设计稿(放入设计稿)', 'name' => '设计稿(放入设计稿)',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1762,6 +1906,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 5, 'project_id' => 5,
'column_id' => 25, 'column_id' => 25,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 13,
'flow_item_name' => '待处理',
'name' => '提测(放入提测时间规划表)', 'name' => '提测(放入提测时间规划表)',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1786,6 +1932,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 5, 'project_id' => 5,
'column_id' => 25, 'column_id' => 25,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 13,
'flow_item_name' => '待处理',
'name' => '发布流程(放入发布流程,应用文案等)', 'name' => '发布流程(放入发布流程,应用文案等)',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1810,6 +1958,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 5, 'project_id' => 5,
'column_id' => 25, 'column_id' => 25,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 13,
'flow_item_name' => '待处理',
'name' => '-----上线需求-----(将左边列表中的需求拖动至下方,表示本版本上线需求)', 'name' => '-----上线需求-----(将左边列表中的需求拖动至下方,表示本版本上线需求)',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1834,6 +1984,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 6, 'project_id' => 6,
'column_id' => 26, 'column_id' => 26,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 17,
'flow_item_name' => '待处理',
'name' => '将小组一年工作目标拆解,设置出里程碑时间节点。并指派相关责任人。用标签来展示进行状况', 'name' => '将小组一年工作目标拆解,设置出里程碑时间节点。并指派相关责任人。用标签来展示进行状况',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1858,6 +2010,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 6, 'project_id' => 6,
'column_id' => 27, 'column_id' => 27,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 19,
'flow_item_name' => '已完成',
'name' => '🚴 里程碑 1 需求评审完成,资源准备到位', 'name' => '🚴 里程碑 1 需求评审完成,资源准备到位',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1882,6 +2036,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 6, 'project_id' => 6,
'column_id' => 27, 'column_id' => 27,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 17,
'flow_item_name' => '待处理',
'name' => '🚴 里程碑 2 设计完成,进行评审', 'name' => '🚴 里程碑 2 设计完成,进行评审',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1906,6 +2062,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 6, 'project_id' => 6,
'column_id' => 28, 'column_id' => 28,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 17,
'flow_item_name' => '待处理',
'name' => '🚴 里程碑 3 产品开发完成,开始提测', 'name' => '🚴 里程碑 3 产品开发完成,开始提测',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1930,6 +2088,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 6, 'project_id' => 6,
'column_id' => 28, 'column_id' => 28,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 17,
'flow_item_name' => '待处理',
'name' => '🚴 里程碑 4 测试完成准备线上发布', 'name' => '🚴 里程碑 4 测试完成准备线上发布',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1954,6 +2114,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 6, 'project_id' => 6,
'column_id' => 28, 'column_id' => 28,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 17,
'flow_item_name' => '待处理',
'name' => '测试1', 'name' => '测试1',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -1978,6 +2140,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 6, 'project_id' => 6,
'column_id' => 28, 'column_id' => 28,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 17,
'flow_item_name' => '待处理',
'name' => '测试2', 'name' => '测试2',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2002,6 +2166,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 6, 'project_id' => 6,
'column_id' => 28, 'column_id' => 28,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 17,
'flow_item_name' => '待处理',
'name' => '测试3', 'name' => '测试3',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2026,6 +2192,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 6, 'project_id' => 6,
'column_id' => 29, 'column_id' => 29,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 17,
'flow_item_name' => '待处理',
'name' => '🚴 里程碑 5 市场发布', 'name' => '🚴 里程碑 5 市场发布',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2050,6 +2218,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 7, 'project_id' => 7,
'column_id' => 32, 'column_id' => 32,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 21,
'flow_item_name' => '待处理',
'name' => '产品官网设计', 'name' => '产品官网设计',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2074,6 +2244,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 7, 'project_id' => 7,
'column_id' => 32, 'column_id' => 32,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 23,
'flow_item_name' => '已完成',
'name' => '首页', 'name' => '首页',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2098,6 +2270,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 7, 'project_id' => 7,
'column_id' => 32, 'column_id' => 32,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 23,
'flow_item_name' => '已完成',
'name' => '公司介绍', 'name' => '公司介绍',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2122,6 +2296,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 7, 'project_id' => 7,
'column_id' => 32, 'column_id' => 32,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 23,
'flow_item_name' => '已完成',
'name' => '新闻动态', 'name' => '新闻动态',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2146,6 +2322,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 7, 'project_id' => 7,
'column_id' => 32, 'column_id' => 32,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 23,
'flow_item_name' => '已完成',
'name' => '产品介绍', 'name' => '产品介绍',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2170,6 +2348,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 7, 'project_id' => 7,
'column_id' => 32, 'column_id' => 32,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 23,
'flow_item_name' => '已完成',
'name' => '案例展示', 'name' => '案例展示',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2194,6 +2374,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 7, 'project_id' => 7,
'column_id' => 32, 'column_id' => 32,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 21,
'flow_item_name' => '待处理',
'name' => '联系我们', 'name' => '联系我们',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2218,6 +2400,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 7, 'project_id' => 7,
'column_id' => 32, 'column_id' => 32,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 21,
'flow_item_name' => '待处理',
'name' => '官网新增一级栏目,“招聘信息”', 'name' => '官网新增一级栏目,“招聘信息”',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2242,6 +2426,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 7, 'project_id' => 7,
'column_id' => 33, 'column_id' => 33,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 21,
'flow_item_name' => '待处理',
'name' => '产品官网', 'name' => '产品官网',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',
@ -2266,6 +2452,8 @@ class ProjectTasksTableSeeder extends Seeder
'project_id' => 5, 'project_id' => 5,
'column_id' => 24, 'column_id' => 24,
'dialog_id' => 0, 'dialog_id' => 0,
'flow_item_id' => 13,
'flow_item_name' => '待处理',
'name' => '版本的确定', 'name' => '版本的确定',
'color' => '', 'color' => '',
'desc' => '', 'desc' => '',

View File

@ -4,6 +4,7 @@ services:
php: php:
container_name: "dootask-php-${APP_ID}" container_name: "dootask-php-${APP_ID}"
image: "kuaifan/php:swoole-8.0" image: "kuaifan/php:swoole-8.0"
shm_size: "1024m"
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- ./docker/crontab/crontab.conf:/etc/supervisor/conf.d/crontab.conf - ./docker/crontab/crontab.conf:/etc/supervisor/conf.d/crontab.conf

View File

@ -1,4 +1,5 @@
const fs = require('fs') const fs = require('fs')
const fse = require('fs-extra')
const os = require("os"); const os = require("os");
const path = require('path') const path = require('path')
const XLSX = require('xlsx'); const XLSX = require('xlsx');
@ -14,13 +15,49 @@ let mainWindow = null,
devloadUrl = "", devloadUrl = "",
devloadCachePath = path.resolve(__dirname, ".devload"), devloadCachePath = path.resolve(__dirname, ".devload"),
downloadList = [], downloadList = [],
downloadCacheFile = path.join(app.getPath('cache'), config.name + '.downloadCache'); downloadCacheFile = path.join(app.getPath('cache'), config.name, '.downloadCache');
if (fs.existsSync(devloadCachePath)) { if (fs.existsSync(devloadCachePath)) {
devloadUrl = fs.readFileSync(devloadCachePath, 'utf8') devloadUrl = fs.readFileSync(devloadCachePath, 'utf8')
} }
if (fs.existsSync(downloadCacheFile)) { if (fs.existsSync(downloadCacheFile)) {
downloadList = utils.jsonParse(fs.readFileSync(downloadCacheFile, 'utf8'), []) downloadList = utils.jsonParse(fs.readFileSync(downloadCacheFile, 'utf8'), [])
} else {
fse.ensureDirSync(path.join(app.getPath('cache'), config.name))
}
function downloadUpdate(item) {
const chain = item.getURLChain()
if (chain.length == 0) {
return
}
let currentState = item.getState()
if (currentState == "progressing" && item.isPaused()) {
currentState = "paused"
}
//
const downloadItem = downloadList.find(item => item.url == chain[0])
if (downloadItem && downloadItem.state != currentState) {
downloadItem.state = currentState;
downloadItem.result = {
url: item.getURL(),
name: item.getFilename(),
savePath: item.getSavePath(),
mimeType: item.getMimeType(),
totalBytes: item.getTotalBytes(),
chain,
};
fs.writeFileSync(downloadCacheFile, utils.jsonStringify(downloadList), 'utf8');
//
if (currentState == 'completed') {
mainWindow.webContents.send("downloadDone", downloadItem)
log.info("下载完成", downloadItem)
} else {
mainWindow.webContents.send("downloadUpdate", downloadItem)
log.info("下载更新", downloadItem)
}
}
} }
function createMainWindow() { function createMainWindow() {
@ -69,37 +106,12 @@ function createMainWindow() {
}) })
mainWindow.webContents.session.on('will-download', (event, item) => { mainWindow.webContents.session.on('will-download', (event, item) => {
item.setSavePath(path.join(app.getPath('cache'), item.getFilename())); item.setSavePath(path.join(app.getPath('cache'), config.name, item.getFilename()));
item.on('done', (event, state) => { item.on('updated', () => {
try { downloadUpdate(item)
const info = { })
state, item.on('done', () => {
name: item.getFilename(), downloadUpdate(item)
url: item.getURL(),
chain: item.getURLChain(),
savePath: item.getSavePath(),
mimeType: item.getMimeType(),
totalBytes: item.getTotalBytes(),
};
mainWindow.webContents.send("downloadDone", info)
//
if (info.state == "completed") {
// 下载完成
info.chain.some(url => {
let download = downloadList.find(item => item.url == url)
if (download) {
download.status = "completed"
download.info = info
}
})
fs.writeFileSync(downloadCacheFile, utils.jsonStringify(downloadList), 'utf8');
} else {
// 下载失败
info.chain.some(url => {
downloadList = downloadList.filter(item => item.url != url)
})
}
} catch (e) { }
}) })
}) })
} }
@ -201,26 +213,33 @@ ipcMain.on('inheritClose', (event) => {
* @param args {url} * @param args {url}
*/ */
ipcMain.on('downloadFile', (event, args) => { ipcMain.on('downloadFile', (event, args) => {
const download = downloadList.find(({url}) => url == args.url);
if (download) {
if (download.status == "completed") {
if (fs.existsSync(download.info.savePath)) {
log.warn("已下载完成", args)
mainWindow.webContents.send("downloadDone", download.info)
} else {
log.info("开始重新下载", args)
download.status = "progressing"
mainWindow.webContents.downloadURL(args.url);
}
} else {
log.warn("已在下载列表中", args)
}
} else {
log.info("开始下载", args)
downloadList.push(Object.assign(args, { status: "progressing" }))
mainWindow.webContents.downloadURL(args.url);
}
event.returnValue = "ok" event.returnValue = "ok"
//
let appendJson = {state: "progressing", startTime: utils.Time()}
let downloadItem = downloadList.find(({url}) => url == args.url)
if (downloadItem) {
switch (downloadItem.state) {
case "completed":
if (fs.existsSync(downloadItem.result.savePath)) { // 下载完成,文件存在
log.info("下载已完成", downloadItem)
mainWindow.webContents.send("downloadDone", downloadItem)
return
}
break;
case "progressing":
if (downloadItem.startTime + 480 > utils.Time()) { // 下载中未超时超时时间8分钟
log.info("下载已存在", downloadItem)
return;
}
break;
}
downloadItem = Object.assign(downloadItem, appendJson)
} else {
downloadList.push(downloadItem = Object.assign(args, appendJson))
}
fs.writeFileSync(downloadCacheFile, utils.jsonStringify(downloadList), 'utf8');
mainWindow.webContents.downloadURL(downloadItem.url);
log.info("下载开始", downloadItem)
}) })
/** /**

View File

@ -1,6 +1,6 @@
{ {
"name": "DooTask", "name": "DooTask",
"version": "0.6.20", "version": "0.6.41",
"description": "DooTask is task management system.", "description": "DooTask is task management system.",
"main": "main.js", "main": "main.js",
"license": "MIT", "license": "MIT",

View File

@ -252,4 +252,21 @@ module.exports = {
let domain = (weburl + "").match(urlReg); let domain = (weburl + "").match(urlReg);
return ((domain != null && domain.length > 0) ? domain[2] : ""); return ((domain != null && domain.length > 0) ? domain[2] : "");
}, },
/**
* 返回10位数时间戳
* @param v
* @returns {number}
* @constructor
*/
Time(v = undefined) {
let time
if (typeof v === "string" && this.strExists(v, "-")) {
v = v.replace(/-/g, '/');
time = new Date(v).getTime();
} else {
time = new Date().getTime();
}
return Math.round(time / 1000)
},
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "DooTask", "name": "DooTask",
"version": "0.6.20", "version": "0.6.41",
"description": "DooTask is task management system.", "description": "DooTask is task management system.",
"scripts": { "scripts": {
"start": "./cmd dev", "start": "./cmd dev",
@ -64,7 +64,7 @@
"stylus-loader": "^6.2.0", "stylus-loader": "^6.2.0",
"tinymce": "^5.10.2", "tinymce": "^5.10.2",
"tui-calendar-hi": "^1.15.1-5", "tui-calendar-hi": "^1.15.1-5",
"view-design-hi": "^4.7.0-5", "view-design-hi": "^4.7.0-7",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-clipboard2": "^0.3.3", "vue-clipboard2": "^0.3.3",
"vue-emoji-picker": "^1.0.3", "vue-emoji-picker": "^1.0.3",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/*! /*!
* html2canvas 1.3.3 <https://html2canvas.hertzen.com> * html2canvas 1.4.0 <https://html2canvas.hertzen.com>
* Copyright (c) 2021 Niklas von Hertzen <https://hertzen.com> * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
* Released under MIT License * Released under MIT License
*/ */

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/*! /*!
* TOAST UI Calendar * TOAST UI Calendar
* @version 1.15.1 | Wed Dec 22 2021 * @version 1.15.1-5 | Sun Jan 09 2022
* @author NHN FE Development Lab <dl_javascript@nhn.com> * @author NHN FE Development Lab <dl_javascript@nhn.com>
* @license MIT * @license MIT
*/ */
@ -304,7 +304,7 @@
/*! ./weekdayInMonth */ /*! ./weekdayInMonth */
/*! @license DOMPurify 2.3.1 | (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.1/LICENSE */ /*! @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 */
/*! dompurify */ /*! dompurify */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
public/js/build/62.js Normal file

File diff suppressed because one or more lines are too long

2
public/js/build/631.js Normal file

File diff suppressed because one or more lines are too long

1
public/js/build/700.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
public/js/build/834.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
<div v-if="$Electron" class="common-app-down-link" @click="releasesNotification"> <div v-if="$Electron" class="common-app-down-link" @click="releasesNotification">
<Icon type="md-download"/> {{$L(repoTitle)}} <Icon type="md-download"/> {{$L(repoTitle)}}
</div> </div>
<a v-else class="common-app-down-link" :href="releases.html_url" target="_blank"> <a v-else class="common-app-down-link" :href="repoReleases.html_url" target="_blank">
<Icon type="md-download"/> {{$L(repoTitle)}} <Icon type="md-download"/> {{$L(repoTitle)}}
</a> </a>
</div> </div>
@ -15,7 +15,6 @@ import MarkdownPreview from "./MDEditor/components/preview";
import axios from "axios"; import axios from "axios";
Vue.component('MarkdownPreview', MarkdownPreview) Vue.component('MarkdownPreview', MarkdownPreview)
import {Store} from "le5le-store";
import {mapState} from "vuex"; import {mapState} from "vuex";
export default { export default {
@ -26,19 +25,19 @@ export default {
repoName: 'kuaifan/dootask', repoName: 'kuaifan/dootask',
repoData: {}, repoData: {},
repoStatus: 0, // 0 12
repoReleases: {},
status: 0, // 0 12 downloadResult: {},
releases: {},
downInfo: {},
} }
}, },
mounted() { mounted() {
this.getReleases(); this.getReleases();
// //
if (this.$Electron) { if (this.$Electron) {
this.$Electron.ipcRenderer.on('downloadDone', (event, args) => { this.$Electron.ipcRenderer.on('downloadDone', (event, {result}) => {
if (args.name == this.repoData.name) { if (result.name == this.repoData.name) {
this.downInfo = args; this.downloadResult = result;
this.releasesNotification() this.releasesNotification()
} }
}) })
@ -49,10 +48,10 @@ export default {
'wsOpenNum', 'wsOpenNum',
]), ]),
repoTitle() { repoTitle() {
return this.status == 2 ? '更新客户端' : '客户端下载'; return this.repoStatus == 2 ? '更新客户端' : '客户端下载';
}, },
showButton() { showButton() {
return this.status && !this.$store.state.windowMax768 && ['login', 'manage-dashboard'].includes(this.$route.name) return this.repoStatus && !this.$store.state.windowMax768 && ['login', 'manage-dashboard'].includes(this.$route.name)
} }
}, },
watch: { watch: {
@ -108,7 +107,7 @@ export default {
}, },
getReleases() { getReleases() {
if (this.status > 0) { if (this.repoStatus > 0) {
return; return;
} }
if (this.loadIng > 0) { if (this.loadIng > 0) {
@ -116,10 +115,11 @@ export default {
} }
// //
let cache = $A.getStorageJson("cacheAppdown"); let cache = $A.getStorageJson("cacheAppdown");
let timeout = 1800; let timeout = 600;
if (cache.time && cache.time + timeout > Math.round(new Date().getTime() / 1000)) { if (cache.time && cache.time + timeout > Math.round(new Date().getTime() / 1000)) {
this.releases = cache.data; this.repoReleases = cache.data;
this.chackReleases() this.chackReleases()
setTimeout(this.getReleases, timeout * 1000)
return; return;
} }
// //
@ -127,22 +127,24 @@ export default {
axios.get("https://api.github.com/repos/" + this.repoName + "/releases/latest").then(({status, data}) => { axios.get("https://api.github.com/repos/" + this.repoName + "/releases/latest").then(({status, data}) => {
this.loadIng--; this.loadIng--;
if (status === 200) { if (status === 200) {
$A.setStorage("cacheAppdown", { cache = {
time: Math.round(new Date().getTime() / 1000), time: Math.round(new Date().getTime() / 1000),
data: data data: data
}); }
this.releases = data; $A.setStorage("cacheAppdown", cache);
this.chackReleases(); this.repoReleases = cache.data;
setTimeout(this.getReleases, timeout) this.chackReleases()
} }
setTimeout(this.getReleases, timeout * 1000)
}).catch(() => { }).catch(() => {
this.loadIng--; this.loadIng--;
setTimeout(this.getReleases, timeout * 1000)
}); });
}, },
chackReleases() { chackReleases() {
let hostName = $A.getDomain(window.systemInfo.apiUrl); let hostName = $A.getDomain(window.systemInfo.apiUrl);
if (hostName == "" || hostName == '127.0.0.1') { if (hostName == "" || $A.leftExists(hostName, '127.0.0.1')) {
hostName = "public" hostName = "public"
} }
if (this.$Electron) { if (this.$Electron) {
@ -153,18 +155,18 @@ export default {
} }
let artifactName = null; let artifactName = null;
if (match[2] === 'darwin') { if (match[2] === 'darwin') {
artifactName = `${hostName}-${this.releases.tag_name}-mac-${match[3]}.pkg`; artifactName = `${hostName}-${this.repoReleases.tag_name}-mac-${match[3]}.pkg`;
} else if (match[2] === 'win32') { } else if (match[2] === 'win32') {
artifactName = `${hostName}-${this.releases.tag_name}-win-${match[3]}.exe`; artifactName = `${hostName}-${this.repoReleases.tag_name}-win-${match[3]}.exe`;
} else { } else {
return; return;
} }
this.repoData = (this.releases.assets || []).find(({name}) => name == artifactName); this.repoData = (this.repoReleases.assets || []).find(({name}) => name == artifactName);
if (!this.repoData) { if (!this.repoData) {
return; return;
} }
let currentVersion = window.systemInfo.version; let currentVersion = window.systemInfo.version;
let latestVersion = $A.leftDelete(this.releases.tag_name.toLowerCase(), "v") let latestVersion = $A.leftDelete(this.repoReleases.tag_name.toLowerCase(), "v")
if (this.compareVersion(latestVersion, currentVersion) === 1) { if (this.compareVersion(latestVersion, currentVersion) === 1) {
// //
console.log("New version: " + latestVersion); console.log("New version: " + latestVersion);
@ -174,26 +176,23 @@ export default {
} }
} else { } else {
// //
this.repoData = (this.releases.assets || []).find(({name}) => $A.strExists(name, hostName)); this.repoData = (this.repoReleases.assets || []).find(({name}) => $A.strExists(name, hostName));
if (this.repoData) { if (this.repoData) {
let latestVersion = $A.leftDelete(this.releases.tag_name.toLowerCase(), "v") let latestVersion = $A.leftDelete(this.repoReleases.tag_name.toLowerCase(), "v")
console.log("Exist client: " + latestVersion); console.log("Exist client: " + latestVersion);
this.status = 1; this.repoStatus = 1;
} }
} }
}, },
releasesNotification() { releasesNotification() {
if (this.downInfo.state != "completed") {
return;
}
$A.modalConfirm({ $A.modalConfirm({
okText: this.$L('立即更新'), okText: this.$L('立即更新'),
onOk: () => { onOk: () => {
this.installApplication(); this.installApplication();
}, },
onCancel: () => { onCancel: () => {
this.status = 2; this.repoStatus = 2;
}, },
render: (h) => { render: (h) => {
return h('div', { return h('div', {
@ -209,12 +208,12 @@ export default {
props: { props: {
color: 'volcano' color: 'volcano'
} }
}, this.releases.tag_name) }, this.repoReleases.tag_name)
]), ]),
h('MarkdownPreview', { h('MarkdownPreview', {
class: 'notification-body', class: 'notification-body',
props: { props: {
initialValue: this.releases.body initialValue: this.repoReleases.body
} }
}), }),
]) ])
@ -227,7 +226,7 @@ export default {
return; return;
} }
this.$Electron.ipcRenderer.send('openFile', { this.$Electron.ipcRenderer.send('openFile', {
path: this.downInfo.savePath path: this.downloadResult.savePath
}); });
this.$Electron.ipcRenderer.send('windowQuit'); this.$Electron.ipcRenderer.send('windowQuit');
} }

View File

@ -1,29 +1,28 @@
<template> <template>
<transition name="transition-drop"> <div
<div v-transfer-dom
:data-transfer="transfer" :data-transfer="transfer"
:transfer="transfer" :class="['drawer-overlay', placement, value ? 'overlay-visible' : 'overlay-hide']"
v-transfer-dom :style="overlayStyle">
:class="['drawer-overlay', placement, value ? 'overlay-visible' : 'overlay-hide']"> <div class="overlay-mask" @click="mask"></div>
<div class="overlay-mask" @click="mask"></div> <div class="overlay-body" :style="bodyStyle">
<div class="overlay-body" :style="bodyStyle"> <div class="overlay-close">
<div class="overlay-close"> <a href="javascript:void(0)" @click.stop="close">
<a href="javascript:void(0)" @click.stop="close"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26" fill="none" role="img" class="icon fill-current">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26" fill="none" role="img" class="icon fill-current"> <path d="M8.28596 6.51819C7.7978 6.03003 7.00634 6.03003 6.51819 6.51819C6.03003 7.00634 6.03003 7.7978 6.51819 8.28596L11.2322 13L6.51819 17.714C6.03003 18.2022 6.03003 18.9937 6.51819 19.4818C7.00634 19.97 7.7978 19.97 8.28596 19.4818L13 14.7678L17.714 19.4818C18.2022 19.97 18.9937 19.97 19.4818 19.4818C19.97 18.9937 19.97 18.2022 19.4818 17.714L14.7678 13L19.4818 8.28596C19.97 7.7978 19.97 7.00634 19.4818 6.51819C18.9937 6.03003 18.2022 6.03003 17.714 6.51819L13 11.2322L8.28596 6.51819Z" fill="currentColor"></path>
<path d="M8.28596 6.51819C7.7978 6.03003 7.00634 6.03003 6.51819 6.51819C6.03003 7.00634 6.03003 7.7978 6.51819 8.28596L11.2322 13L6.51819 17.714C6.03003 18.2022 6.03003 18.9937 6.51819 19.4818C7.00634 19.97 7.7978 19.97 8.28596 19.4818L13 14.7678L17.714 19.4818C18.2022 19.97 18.9937 19.97 19.4818 19.4818C19.97 18.9937 19.97 18.2022 19.4818 17.714L14.7678 13L19.4818 8.28596C19.97 7.7978 19.97 7.00634 19.4818 6.51819C18.9937 6.03003 18.2022 6.03003 17.714 6.51819L13 11.2322L8.28596 6.51819Z" fill="currentColor"></path> </svg>
</svg> </a>
</a>
</div>
<ResizeLine v-if="resize" class="overlay-resize" v-model="width" :max-width="0"/>
<div class="overlay-content"><slot/></div>
</div> </div>
<ResizeLine v-if="resize" class="overlay-resize" :placement="placement" v-model="dynamicSize" :min="minSize" :max="0" reverse/>
<div class="overlay-content"><slot/></div>
</div> </div>
</transition> </div>
</template> </template>
<script> <script>
import ResizeLine from "./ResizeLine"; import ResizeLine from "./ResizeLine";
import TransferDom from '../directives/transfer-dom'; import TransferDom from '../directives/transfer-dom';
import {mapState} from "vuex";
export default { export default {
name: 'DrawerOverlay', name: 'DrawerOverlay',
@ -52,6 +51,10 @@
type: [Number, String], type: [Number, String],
default: "100%" default: "100%"
}, },
minSize: {
type: Number,
default: 300
},
resize: { resize: {
type: Boolean, type: Boolean,
default: true default: true
@ -64,7 +67,8 @@
data() { data() {
return { return {
width: 0 dynamicSize: 0,
zIndex: 0,
} }
}, },
@ -77,8 +81,16 @@
}, },
computed: { computed: {
...mapState(['cacheDrawerIndex']),
overlayStyle() {
return {
zIndex: 1000 + this.zIndex
}
},
bodyStyle() { bodyStyle() {
let size = this.width; let size = this.dynamicSize;
size = size <= 100 ? `${size}%` : `${size}px` size = size <= 100 ? `${size}%` : `${size}px`
if (this.placement == 'right') { if (this.placement == 'right') {
return { return {
@ -108,10 +120,16 @@
this.$store.state.cacheDrawerOverlay.splice(index, 1); this.$store.state.cacheDrawerOverlay.splice(index, 1);
} }
} }
//
if (val) {
this.zIndex = this.$store.state.cacheDrawerIndex++;
} else if (this.$store.state.cacheDrawerOverlay.length === 0) {
this.$store.state.cacheDrawerIndex = 0;
}
}, },
size: { size: {
handler(val) { handler(val) {
this.width = parseInt(val); this.dynamicSize = parseInt(val);
}, },
immediate: true immediate: true
} }
@ -124,17 +142,19 @@
} }
}, },
close() { close() {
this.$emit("input", !this.value) this.$emit("input", false)
}, },
escClose(e) { escClose(e) {
if (this.value && this.escClosable) { if (this.value && this.escClosable) {
if (e.keyCode === 27) { if (e.keyCode === 27) {
let show = false; if (this.$Modal.visibles().length > 0) {
$A(".ivu-modal").each((i, e) => { return;
show = $(e).is(":visible"); }
return !show; const list = this.$store.state.cacheDrawerOverlay;
}) if (list.length > 0) {
!show && this.close() const $Drawer = list[list.length - 1]
$Drawer.close();
}
} }
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="component-resize-line" :class="{resizing}" @mousedown.left.stop.prevent="resizeDown"></div> <div class="component-resize-line" :class="[resizing ? 'resizing' : '', placement]" @mousedown.left.stop.prevent="resizeDown"></div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.component-resize-line { .component-resize-line {
@ -19,6 +19,12 @@
cursor: col-resize; cursor: col-resize;
} }
} }
&.bottom {
cursor: row-resize;
&:after {
cursor: row-resize;
}
}
} }
</style> </style>
<script> <script>
@ -28,14 +34,24 @@
props: { props: {
value: { value: {
}, },
minWidth: { min: {
type: Number, type: Number,
default: 100, default: 100,
}, },
maxWidth: { max: {
type: Number, type: Number,
default: 600, default: 600,
}, },
placement: {
validator (value) {
return ['right', 'bottom'].includes(value)
},
default: 'bottom'
},
reverse: {
type: Boolean,
default: false
}
}, },
data() { data() {
@ -47,7 +63,7 @@
offset: {}, offset: {},
tmpWidth: undefined, tmpSize: undefined,
} }
}, },
@ -66,7 +82,7 @@
}; };
this.resizing = true; this.resizing = true;
if (typeof this.value === 'number') { if (typeof this.value === 'number') {
this.tmpWidth = this.value; this.tmpSize = this.value;
} }
this.$emit('on-change', { this.$emit('on-change', {
event: 'down', event: 'down',
@ -78,13 +94,18 @@
} }
let diffX = (e.pageX || e.clientX + document.documentElement.scrollLeft) - this.mouseX; let diffX = (e.pageX || e.clientX + document.documentElement.scrollLeft) - this.mouseX;
let diffY = (e.pageY || e.clientY + document.documentElement.scrollTop) - this.mouseY; let diffY = (e.pageY || e.clientY + document.documentElement.scrollTop) - this.mouseY;
if (typeof this.tmpWidth === 'number') { if (typeof this.tmpSize === 'number') {
let value = this.tmpWidth + diffX; let value;
if (this.minWidth > 0) { if (this.placement == 'bottom') {
value = Math.max(this.minWidth, value); value = this.reverse ? (this.tmpSize - diffY) : (this.tmpSize + diffY);
} else {
value = this.reverse ? (this.tmpSize - diffX) : (this.tmpSize + diffX);
} }
if (this.maxWidth > 0) { if (this.min > 0) {
value = Math.min(this.maxWidth, value); value = Math.max(this.min, value);
}
if (this.max > 0) {
value = Math.min(this.max, value);
} }
this.$emit("input", value); this.$emit("input", value);
} }
@ -99,7 +120,7 @@
}, },
handleUp() { handleUp() {
this.resizing = false; this.resizing = false;
this.tmpWidth = undefined; this.tmpSize = undefined;
this.$emit('on-change', { this.$emit('on-change', {
event: 'up', event: 'up',
}); });

View File

@ -196,7 +196,7 @@
openDialog() { openDialog() {
this.goForward({path: '/manage/messenger'}); this.goForward({path: '/manage/messenger'});
this.$store.dispatch("openDialogUserid", this.userid); this.$store.dispatch("openDialogUserid", this.userid).catch(() => {})
} }
} }
}; };

View File

@ -76,7 +76,7 @@ export default {
this.getDemoAccount(); this.getDemoAccount();
// //
if (this.$Electron) { if (this.$Electron) {
this.chackServerUrl(); this.chackServerUrl().catch(() => {});
} else { } else {
this.clearServerUrl(); this.clearServerUrl();
} }

View File

@ -274,8 +274,8 @@ export default {
$A.messageSuccess("清除成功"); $A.messageSuccess("清除成功");
} }
// //
this.$store.dispatch("getUserInfo"); this.$store.dispatch("getUserInfo").catch(() => {})
this.$store.dispatch("getTaskPriority"); this.$store.dispatch("getTaskPriority").catch(() => {})
// //
this.notificationInit(); this.notificationInit();
this.onVisibilityChange(); this.onVisibilityChange();
@ -635,7 +635,7 @@ export default {
this.notificationClass.replaceTitle(data.name); this.notificationClass.replaceTitle(data.name);
this.notificationClass.userAgreed(); this.notificationClass.userAgreed();
} }
}) }).catch(() => {})
} }
} }
}, },

View File

@ -401,7 +401,7 @@ export default {
} }
} }
}); });
}); }).catch(() => {})
}, },
addDialogMsg() { addDialogMsg() {

View File

@ -219,7 +219,7 @@ export default {
}).then(() => { }).then(() => {
this.loadIng--; this.loadIng--;
this.getLists(); this.getLists();
this.$store.dispatch("getProjectOne", row.id); this.$store.dispatch("getProjectOne", row.id).catch(() => {});
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.loadIng--; this.loadIng--;

View File

@ -785,7 +785,7 @@ export default {
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.sortDisabled = false; this.sortDisabled = false;
this.$store.dispatch("getTaskForProject", this.projectId) this.$store.dispatch("getTaskForProject", this.projectId).catch(() => {})
}); });
}, },
@ -881,7 +881,7 @@ export default {
this.$store.dispatch("saveColumn", data); this.$store.dispatch("saveColumn", data);
}).catch(({msg}) => { }).catch(({msg}) => {
this.$set(this.columnLoad, column.id, false); this.$set(this.columnLoad, column.id, false);
this.$store.dispatch("getColumns", this.projectId) this.$store.dispatch("getColumns", this.projectId).catch(() => {})
$A.modalError(msg); $A.modalError(msg);
}); });
}, },
@ -945,8 +945,8 @@ export default {
$A.messageSuccess(msg); $A.messageSuccess(msg);
this.userLoad--; this.userLoad--;
this.userShow = false; this.userShow = false;
this.$store.dispatch("getProjectOne", this.projectId); this.$store.dispatch("getProjectOne", this.projectId).catch(() => {});
this.$store.dispatch("getTaskForProject", this.projectId) this.$store.dispatch("getTaskForProject", this.projectId).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.userLoad--; this.userLoad--;
@ -965,8 +965,8 @@ export default {
$A.messageSuccess(msg); $A.messageSuccess(msg);
this.transferLoad--; this.transferLoad--;
this.transferShow = false; this.transferShow = false;
this.$store.dispatch("getProjectOne", this.projectId); this.$store.dispatch("getProjectOne", this.projectId).catch(() => {});
this.$store.dispatch("getTaskForProject", this.projectId) this.$store.dispatch("getTaskForProject", this.projectId).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.transferLoad--; this.transferLoad--;

View File

@ -270,7 +270,7 @@ export default {
}, },
methods: { methods: {
initLanguage() { initLanguage() {
}, },
initCascaderData() { initCascaderData() {
@ -321,7 +321,7 @@ export default {
this.addData.project_id = column.project_id; this.addData.project_id = column.project_id;
this.addData.column_id = column.id; this.addData.column_id = column.id;
} }
}); }).catch(() => {});
} }
} }
} }

View File

@ -376,13 +376,14 @@
class="dialog-input" class="dialog-input"
v-model="msgText" v-model="msgText"
type="textarea" type="textarea"
:disabled="sendLoad > 0"
:rows="1" :rows="1"
:autosize="{ minRows: 1, maxRows: 3 }" :autosize="{ minRows: 1, maxRows: 3 }"
:maxlength="255" :maxlength="255"
:placeholder="$L('输入消息...')" :placeholder="$L('输入消息...')"
@on-keydown="msgKeydown"/> @on-keydown="msgKeydown"/>
<div class="no-send" @click="openSend"> <div class="no-send" @click="openSend">
<Loading v-if="sendLoad"/> <Loading v-if="sendLoad > 0"/>
<Icon v-else type="md-send" /> <Icon v-else type="md-send" />
</div> </div>
</div> </div>
@ -458,7 +459,7 @@ export default {
navActive: 'dialog', navActive: 'dialog',
logLoadIng: false, logLoadIng: false,
sendLoad: false, sendLoad: 0,
taskPlugins: [ taskPlugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak', 'advlist autolink lists link image charmap print preview hr anchor pagebreak',
@ -828,7 +829,7 @@ export default {
this.ownerLoad--; this.ownerLoad--;
this.ownerShow = false; this.ownerShow = false;
this.receiveShow = false; this.receiveShow = false;
this.$store.dispatch("getTaskOne", this.taskDetail.id); this.$store.dispatch("getTaskOne", this.taskDetail.id).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.ownerLoad--; this.ownerLoad--;
@ -859,7 +860,7 @@ export default {
$A.messageSuccess(msg); $A.messageSuccess(msg);
this.assistLoad--; this.assistLoad--;
this.assistShow = false; this.assistShow = false;
this.$store.dispatch("getTaskOne", this.taskDetail.id); this.$store.dispatch("getTaskOne", this.taskDetail.id).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.assistLoad--; this.assistLoad--;
@ -1007,6 +1008,11 @@ export default {
if (!this.msgText) { if (!this.msgText) {
return; return;
} }
if (this.sendLoad > 0) {
return;
}
this.sendLoad++;
//
this.$store.dispatch("call", { this.$store.dispatch("call", {
url: 'project/task/dialog', url: 'project/task/dialog',
data: { data: {
@ -1014,56 +1020,60 @@ export default {
}, },
}).then(({data}) => { }).then(({data}) => {
this.$store.dispatch("saveTask", data); this.$store.dispatch("saveTask", data);
this.$store.dispatch("getDialogOne", data.dialog_id); this.$store.dispatch("getDialogOne", data.dialog_id).then(() => {
if ($A.isSubElectron) { this.sendLoad--;
this.resizeDialog(); if ($A.isSubElectron) {
return; this.resizeDialog();
}
this.$nextTick(() => {
if (this.$store.state.windowMax768) {
this.goForward({path: '/manage/messenger', query: {sendmsg: this.msgText}});
$A.setStorage("messenger::dialogId", data.dialog_id)
this.$store.state.dialogOpenId = data.dialog_id;
this.$store.dispatch('openTask', 0);
this.msgText = "";
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.dialog.sendMsg(this.msgText); if (this.$store.state.windowMax768) {
this.goForward({path: '/manage/messenger', query: {sendmsg: this.msgText}});
$A.setStorage("messenger::dialogId", data.dialog_id)
this.$store.state.dialogOpenId = data.dialog_id;
this.$store.dispatch('openTask', 0);
} else {
this.$refs.dialog.sendMsg(this.msgText);
}
this.msgText = ""; this.msgText = "";
}) });
} }
}).catch(({msg}) => {
this.sendLoad--;
$A.modalError(msg);
}); });
}).catch(({msg}) => { }).catch(({msg}) => {
this.sendLoad--;
$A.modalError(msg); $A.modalError(msg);
}); });
}, },
openSend() { openSend() {
if (this.sendLoad) { if (this.sendLoad > 0) {
return; return;
} }
this.sendLoad = true; this.sendLoad++;
//
this.$store.dispatch("call", { this.$store.dispatch("call", {
url: 'project/task/dialog', url: 'project/task/dialog',
data: { data: {
task_id: this.taskDetail.id, task_id: this.taskDetail.id,
}, },
}).then(({data}) => { }).then(({data}) => {
this.sendLoad = false; this.sendLoad--;
this.$store.dispatch("saveTask", data); this.$store.dispatch("saveTask", data);
this.$store.dispatch("getDialogOne", data.dialog_id); this.$store.dispatch("getDialogOne", data.dialog_id).catch(() => {})
if ($A.isSubElectron) { if ($A.isSubElectron) {
this.resizeDialog(); this.resizeDialog();
return; } else {
this.$nextTick(() => {
this.goForward({path: '/manage/messenger', query: {sendmsg: this.msgText}});
$A.setStorage("messenger::dialogId", data.dialog_id)
this.$store.state.dialogOpenId = data.dialog_id;
this.$store.dispatch('openTask', 0);
});
} }
this.$nextTick(() => {
this.goForward({path: '/manage/messenger', query: {sendmsg: this.msgText}});
$A.setStorage("messenger::dialogId", data.dialog_id)
this.$store.state.dialogOpenId = data.dialog_id;
this.$store.dispatch('openTask', 0);
});
}).catch(({msg}) => { }).catch(({msg}) => {
this.sendLoad = false; this.sendLoad--;
$A.modalError(msg); $A.modalError(msg);
}); });
}, },
@ -1128,10 +1138,8 @@ export default {
if (this.$refs.dialog || num > 20) { if (this.$refs.dialog || num > 20) {
clearInterval(interval); clearInterval(interval);
if (this.$refs.dialog) { if (this.$refs.dialog) {
this.$nextTick(() => { this.$refs.dialog.sendMsg(this.msgText);
this.$refs.dialog.sendMsg(this.msgText); this.msgText = "";
this.msgText = "";
})
} }
} }
}, 100); }, 100);

View File

@ -57,7 +57,7 @@
</div> </div>
</EDropdownItem> </EDropdownItem>
<template v-if="colorShow"> <template v-if="colorShow">
<EDropdownItem v-for="(c, k) in taskColorList" :key="k" :divided="k==0" :command="c"> <EDropdownItem v-for="(c, k) in taskColorList" :key="'c_' + k" :divided="k==0" :command="c">
<div class="item"> <div class="item">
<i class="taskfont" :style="{color:c.color||'#f9f9f9'}" v-html="c.color == task.color ? '&#xe61d;' : '&#xe61c;'"></i>{{$L(c.name)}} <i class="taskfont" :style="{color:c.color||'#f9f9f9'}" v-html="c.color == task.color ? '&#xe61d;' : '&#xe61c;'"></i>{{$L(c.name)}}
</div> </div>
@ -162,7 +162,7 @@ export default {
// //
this.updateTask({ this.updateTask({
color: command.color color: command.color
}) }).catch(() => {})
} }
return; return;
} }
@ -172,7 +172,7 @@ export default {
if (flow_item_id == this.task.flow_item_id) return; if (flow_item_id == this.task.flow_item_id) return;
this.updateTask({ this.updateTask({
flow_item_id flow_item_id
}) }).catch(() => {})
return; return;
} }
const cacheTask = this.task; const cacheTask = this.task;
@ -218,7 +218,7 @@ export default {
visibleChange(visible) { visibleChange(visible) {
if (visible) { if (visible) {
this.$store.dispatch("getTaskFlow", this.task.id); this.$store.dispatch("getTaskFlow", this.task.id).catch(() => {})
} }
}, },
@ -239,7 +239,7 @@ export default {
this.$emit("on-update", data) this.$emit("on-update", data)
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.$store.dispatch("getTaskOne", this.task.id); this.$store.dispatch("getTaskOne", this.task.id).catch(() => {})
reject() reject()
}); });
}) })

View File

@ -188,7 +188,7 @@ export default {
// //
el[0].updateTask({ el[0].updateTask({
column_id: $A.leftDelete(command, 'column::') column_id: $A.leftDelete(command, 'column::')
}) }).catch(() => {})
return; return;
} }
if ($A.leftExists(command, 'priority::')) { if ($A.leftExists(command, 'priority::')) {
@ -199,7 +199,7 @@ export default {
p_level: data.priority, p_level: data.priority,
p_name: data.name, p_name: data.name,
p_color: data.color, p_color: data.color,
}) }).catch(() => {})
} }
} }
}, },

View File

@ -321,21 +321,20 @@ export default {
}, },
operationUser(data) { operationUser(data) {
let that = this; return new Promise((resolve) => {
return new Promise(function (resolve) { this.loadIng++;
that.loadIng++; this.$store.dispatch("call", {
that.$store.dispatch("call", {
url: 'users/operation', url: 'users/operation',
data, data,
}).then(({msg}) => { }).then(({msg}) => {
$A.messageSuccess(msg); $A.messageSuccess(msg);
that.loadIng--; this.loadIng--;
that.getLists(); this.getLists();
resolve() resolve()
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg, 301); $A.modalError(msg, 301);
that.loadIng--; this.loadIng--;
that.getLists(); this.getLists();
resolve() resolve()
}) })
}) })

View File

@ -57,8 +57,8 @@ export default {
setTimeout(() => { setTimeout(() => {
this.$store.state.projectId = $A.runNum(id); this.$store.state.projectId = $A.runNum(id);
this.$store.dispatch("getProjectOne", id).then(() => { this.$store.dispatch("getProjectOne", id).then(() => {
this.$store.dispatch("getColumns", id); this.$store.dispatch("getColumns", id).catch(() => {});
this.$store.dispatch("getTaskForProject", id); this.$store.dispatch("getTaskForProject", id).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalWarning({ $A.modalWarning({
content: msg, content: msg,

View File

@ -82,7 +82,7 @@ export default {
}).then(() => { }).then(() => {
$A.messageSuccess('修改成功'); $A.messageSuccess('修改成功');
this.loadIng--; this.loadIng--;
this.$store.dispatch('getUserInfo'); this.$store.dispatch('getUserInfo').catch(() => {});
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalError(msg); $A.modalError(msg);
this.loadIng--; this.loadIng--;

View File

@ -70,7 +70,7 @@ export default {
this.taskInfo = data; this.taskInfo = data;
this.$store.dispatch("getTaskContent", task_id); this.$store.dispatch("getTaskContent", task_id);
this.$store.dispatch("getTaskFiles", task_id); this.$store.dispatch("getTaskFiles", task_id);
this.$store.dispatch("getTaskForParent", task_id); this.$store.dispatch("getTaskForParent", task_id).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
this.loadIng--; this.loadIng--;
$A.modalError({ $A.modalError({

View File

@ -171,7 +171,7 @@ export default {
* @param dispatch * @param dispatch
*/ */
getBasicData({dispatch}) { getBasicData({dispatch}) {
dispatch("getProjects"); dispatch("getProjects").catch(() => {});
dispatch("getDialogs"); dispatch("getDialogs");
dispatch("getTaskForDashboard"); dispatch("getTaskForDashboard");
}, },
@ -383,7 +383,7 @@ export default {
* @returns {Promise<unknown>} * @returns {Promise<unknown>}
*/ */
handleClearCache({state, dispatch}, userInfo) { handleClearCache({state, dispatch}, userInfo) {
return new Promise(function (resolve, reject) { return new Promise(function (resolve) {
try { try {
const cacheLoginEmail = $A.getStorageString("cacheLoginEmail"); const cacheLoginEmail = $A.getStorageString("cacheLoginEmail");
// //
@ -402,7 +402,7 @@ export default {
// //
resolve() resolve()
} catch (e) { } catch (e) {
reject(e) resolve()
} }
}); });
}, },
@ -651,7 +651,7 @@ export default {
resolve(result) resolve(result)
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("getProjectOne", project_id); dispatch("getProjectOne", project_id).catch(() => {})
reject(e) reject(e)
}); });
}); });
@ -679,7 +679,7 @@ export default {
resolve(result) resolve(result)
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("getProjectOne", project_id); dispatch("getProjectOne", project_id).catch(() => {})
reject(e) reject(e)
}); });
}); });
@ -707,7 +707,7 @@ export default {
resolve(result) resolve(result)
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("getProjectOne", project_id); dispatch("getProjectOne", project_id).catch(() => {})
reject(e) reject(e)
}); });
}); });
@ -758,11 +758,11 @@ export default {
let index = state.cacheColumns.findIndex(column => column.id == id); let index = state.cacheColumns.findIndex(column => column.id == id);
if (index > -1) { if (index > -1) {
project_ids.push(state.cacheColumns[index].project_id) project_ids.push(state.cacheColumns[index].project_id)
dispatch('getProjectOne', state.cacheColumns[index].project_id) dispatch('getProjectOne', state.cacheColumns[index].project_id).catch(() => {})
state.cacheColumns.splice(index, 1); state.cacheColumns.splice(index, 1);
} }
}) })
Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id)) Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id).catch(() => {}))
// //
setTimeout(() => { setTimeout(() => {
$A.setStorage("cacheColumns", state.cacheColumns); $A.setStorage("cacheColumns", state.cacheColumns);
@ -882,16 +882,16 @@ export default {
} }
// //
if (updateMarking.is_update_maintask === true || (data.parent_id > 0 && state.cacheTasks.findIndex(({id}) => id == data.parent_id) === -1)) { if (updateMarking.is_update_maintask === true || (data.parent_id > 0 && state.cacheTasks.findIndex(({id}) => id == data.parent_id) === -1)) {
dispatch("getTaskOne", data.parent_id); dispatch("getTaskOne", data.parent_id).catch(() => {})
} }
if (updateMarking.is_update_project === true) { if (updateMarking.is_update_project === true) {
dispatch("getProjectOne", data.project_id); dispatch("getProjectOne", data.project_id).catch(() => {})
} }
if (updateMarking.is_update_content === true) { if (updateMarking.is_update_content === true) {
dispatch("getTaskContent", data.id); dispatch("getTaskContent", data.id);
} }
if (updateMarking.is_update_subtask === true) { if (updateMarking.is_update_subtask === true) {
dispatch("getTaskForParent", data.id); dispatch("getTaskForParent", data.id).catch(() => {})
} }
// //
setTimeout(() => { setTimeout(() => {
@ -922,8 +922,8 @@ export default {
state.cacheTasks.splice(index, 1); state.cacheTasks.splice(index, 1);
} }
}) })
Array.from(new Set(parent_ids)).some(id => dispatch("getTaskOne", id)) Array.from(new Set(parent_ids)).some(id => dispatch("getTaskOne", id).catch(() => {}))
Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id)) Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id).catch(() => {}))
// //
if (ids.includes(state.taskId)) { if (ids.includes(state.taskId)) {
state.taskId = 0; state.taskId = 0;
@ -1158,7 +1158,7 @@ export default {
resolve(result) resolve(result)
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("getTaskOne", task_id); dispatch("getTaskOne", task_id).catch(() => {})
dispatch("taskLoadEnd", task_id) dispatch("taskLoadEnd", task_id)
reject(e) reject(e)
}); });
@ -1190,7 +1190,7 @@ export default {
resolve(result) resolve(result)
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("getTaskOne", task_id) dispatch("getTaskOne", task_id).catch(() => {})
dispatch("taskLoadEnd", task_id) dispatch("taskLoadEnd", task_id)
reject(e) reject(e)
}); });
@ -1202,31 +1202,25 @@ export default {
* @param state * @param state
* @param dispatch * @param dispatch
* @param task_id * @param task_id
* @returns {Promise<unknown>}
*/ */
getTaskContent({state, dispatch}, task_id) { getTaskContent({state, dispatch}, task_id) {
return new Promise(function (resolve, reject) { if ($A.runNum(task_id) === 0) {
if ($A.runNum(task_id) === 0) { return;
reject({msg: 'Parameter error'}); }
return; dispatch("call", {
url: 'project/task/content',
data: {
task_id,
},
}).then(result => {
let index = state.taskContents.findIndex(({id}) => id == result.data.id)
if (index > -1) {
state.taskContents.splice(index, 1, result.data)
} else {
state.taskContents.push(result.data)
} }
dispatch("call", { }).catch(e => {
url: 'project/task/content', console.warn(e);
data: {
task_id,
},
}).then(result => {
let index = state.taskContents.findIndex(({id}) => id == result.data.id)
if (index > -1) {
state.taskContents.splice(index, 1, result.data)
} else {
state.taskContents.push(result.data)
}
resolve(result)
}).catch(e => {
console.warn(e);
reject(e);
});
}); });
}, },
@ -1235,37 +1229,31 @@ export default {
* @param state * @param state
* @param dispatch * @param dispatch
* @param task_id * @param task_id
* @returns {Promise<unknown>}
*/ */
getTaskFiles({state, dispatch}, task_id) { getTaskFiles({state, dispatch}, task_id) {
return new Promise(function (resolve, reject) { if ($A.runNum(task_id) === 0) {
if ($A.runNum(task_id) === 0) { return;
reject({msg: 'Parameter error'}); }
return; dispatch("call", {
} url: 'project/task/files',
dispatch("call", { data: {
url: 'project/task/files', task_id,
data: { },
task_id, }).then(result => {
}, result.data.forEach((data) => {
}).then(result => { let index = state.taskFiles.findIndex(({id}) => id == data.id)
result.data.forEach((data) => { if (index > -1) {
let index = state.taskFiles.findIndex(({id}) => id == data.id) state.taskFiles.splice(index, 1, data)
if (index > -1) { } else {
state.taskFiles.splice(index, 1, data) state.taskFiles.push(data)
} else { }
state.taskFiles.push(data) })
} dispatch("saveTask", {
}) id: task_id,
dispatch("saveTask", { file_num: result.data.length
id: task_id,
file_num: result.data.length
});
resolve(result)
}).catch(e => {
console.warn(e);
reject(e);
}); });
}).catch(e => {
console.warn(e);
}); });
}, },
@ -1305,7 +1293,7 @@ export default {
dispatch("getTaskOne", task_id).then(() => { dispatch("getTaskOne", task_id).then(() => {
dispatch("getTaskContent", task_id); dispatch("getTaskContent", task_id);
dispatch("getTaskFiles", task_id); dispatch("getTaskFiles", task_id);
dispatch("getTaskForParent", task_id); dispatch("getTaskForParent", task_id).catch(() => {})
}).catch(({msg}) => { }).catch(({msg}) => {
$A.modalWarning({ $A.modalWarning({
content: msg, content: msg,
@ -1375,7 +1363,7 @@ export default {
delete task.new_column delete task.new_column
} }
dispatch("saveTask", task) dispatch("saveTask", task)
dispatch("getProjectOne", task.project_id); dispatch("getProjectOne", task.project_id).catch(() => {})
}, },
/** /**
@ -1400,7 +1388,7 @@ export default {
}).catch(e => { }).catch(e => {
console.warn(e); console.warn(e);
dispatch("taskLoadEnd", post.task_id) dispatch("taskLoadEnd", post.task_id)
dispatch("getTaskOne", post.task_id); dispatch("getTaskOne", post.task_id).catch(() => {})
reject(e) reject(e)
}); });
}).catch(reject) }).catch(reject)
@ -1679,7 +1667,7 @@ export default {
last_at: $A.formatDate("Y-m-d H:i:s") last_at: $A.formatDate("Y-m-d H:i:s")
}); });
} else { } else {
dispatch("getDialogOne", data.dialog_id); dispatch("getDialogOne", data.dialog_id).catch(() => {})
} }
}, },
@ -2060,15 +2048,15 @@ export default {
dispatch("saveProject", data) dispatch("saveProject", data)
break; break;
case 'detail': case 'detail':
dispatch("getProjectOne", data.id); dispatch("getProjectOne", data.id).catch(() => {})
dispatch("getTaskForProject", data.id) dispatch("getTaskForProject", data.id).catch(() => {})
break; break;
case 'archived': case 'archived':
case 'delete': case 'delete':
dispatch("forgetProject", data.id); dispatch("forgetProject", data.id);
break; break;
case 'sort': case 'sort':
dispatch("getTaskForProject", data.id) dispatch("getTaskForProject", data.id).catch(() => {})
break; break;
} }
})(msgDetail); })(msgDetail);
@ -2107,7 +2095,7 @@ export default {
break; break;
case 'dialog': case 'dialog':
dispatch("saveTask", data) dispatch("saveTask", data)
dispatch("getDialogOne", data.dialog_id) dispatch("getDialogOne", data.dialog_id).catch(() => {})
break; break;
case 'upload': case 'upload':
dispatch("getTaskFiles", data.task_id) dispatch("getTaskFiles", data.task_id)

View File

@ -8,6 +8,9 @@ state.windowMax768 = window.innerWidth <= 768;
// 数据缓存 // 数据缓存
state.cacheLoading = {}; state.cacheLoading = {};
// DrawerOverlay
state.cacheDrawerIndex = 0;
state.cacheDrawerOverlay = []; state.cacheDrawerOverlay = [];
// User // User

View File

@ -28,7 +28,8 @@
} }
.notification-body { .notification-body {
max-height: 210px; max-height: 210px;
overflow: auto; overflow-x: hidden;
overflow-y: auto;
margin: 18px 0; margin: 18px 0;
.markdown-preview { .markdown-preview {
margin: -20px -12px; margin: -20px -12px;

View File

@ -7,7 +7,7 @@
z-index: 1000; z-index: 1000;
box-sizing: border-box; box-sizing: border-box;
pointer-events: none; pointer-events: none;
background: rgba(0, 0, 0, 0.76); background: rgba(10, 10, 10, 0.76);
outline: none; outline: none;
opacity: 0; opacity: 0;
display: flex; display: flex;

View File

@ -16,7 +16,7 @@ function runExec(command, cb) {
}); });
} }
runExec("git rev-list --branches master --count", function (err, response) { runExec("git rev-list --count HEAD $(git branch | sed -n -e 's/^\* \(.*\)/\1/p')", function (err, response) {
if (err) { if (err) {
console.error(err); console.error(err);
return; return;