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:
commit
1abd78305f
@ -725,7 +725,7 @@ class Base
|
||||
public static function getHost($var = '')
|
||||
{
|
||||
if (empty($var)) {
|
||||
$var = url("/");
|
||||
$var = self::url();
|
||||
}
|
||||
$arr = parse_url($var);
|
||||
return $arr['host'];
|
||||
@ -756,7 +756,7 @@ class Base
|
||||
) {
|
||||
return $str;
|
||||
} else {
|
||||
return Base::leftDelete(url($str), "http://localhost");
|
||||
return self::url($str);
|
||||
}
|
||||
}
|
||||
|
||||
@ -773,8 +773,35 @@ class Base
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
$find = url('');
|
||||
return Base::leftDelete($str, $find . '/');
|
||||
return Base::leftDelete($str, self::url() . '/');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取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
55
cmd
@ -31,6 +31,15 @@ rand() {
|
||||
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() {
|
||||
local RES=`run_exec php "supervisorctl update $1"`
|
||||
if [ -z "$RES" ]; then
|
||||
@ -117,10 +126,10 @@ run_exec() {
|
||||
echo -e "${Error} ${RedBG} 没有找到 $container 容器! ${Font}"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$container" = "mariadb" ] || [ "$container" = "nginx" ] || [ "$container" = "redis" ]; then
|
||||
docker exec -it "$name" /bin/sh -c "$cmd"
|
||||
else
|
||||
if [ "$container" = "php" ]; then
|
||||
docker exec -it "$name" /bin/bash -c "$cmd"
|
||||
else
|
||||
docker exec -it "$name" /bin/sh -c "$cmd"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -178,8 +187,11 @@ env_set() {
|
||||
if [ -z "$exist" ]; then
|
||||
echo "$key=$val" >> $cur_path/.env
|
||||
else
|
||||
command="sed -i '/^$key=/c\\$key=$val' /www/.env"
|
||||
docker run -it --rm -v ${cur_path}:/www alpine sh -c "$command"
|
||||
if [[ `uname` == 'Linux' ]]; then
|
||||
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
|
||||
echo -e "${Error} ${RedBG} 设置env参数失败!${Font}"
|
||||
exit 1
|
||||
@ -192,10 +204,10 @@ env_init() {
|
||||
cp .env.docker .env
|
||||
fi
|
||||
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
|
||||
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
|
||||
if [ -z "$(env_get APP_IPPR)" ]; then
|
||||
env_set APP_IPPR "10.$(rand 50 100).$(rand 100 200)"
|
||||
@ -207,16 +219,28 @@ arg_get() {
|
||||
local value=""
|
||||
for var in $cur_arg; do
|
||||
if [[ "$find" == "y" ]]; then
|
||||
value=$var
|
||||
if [[ ! $var =~ "--" ]]; then
|
||||
value=$var
|
||||
fi
|
||||
break
|
||||
fi
|
||||
if [[ "--$1" == "$var" ]] || [[ "-$1" == "$var" ]]; then
|
||||
find="y"
|
||||
value="yes"
|
||||
fi
|
||||
done
|
||||
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 [[ "$1" == "init" ]] || [[ "$1" == "install" ]]; then
|
||||
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 package-lock.json
|
||||
@ -302,9 +331,9 @@ if [ $# -gt 0 ]; then
|
||||
echo -e "${OK} ${GreenBG} 卸载完成 ${Font}"
|
||||
elif [[ "$1" == "reinstall" ]]; then
|
||||
shift 1
|
||||
./cmd uninstall
|
||||
./cmd uninstall $@
|
||||
sleep 3
|
||||
./cmd install
|
||||
./cmd install $@
|
||||
elif [[ "$1" == "port" ]]; then
|
||||
shift 1
|
||||
env_set APP_PORT "$1"
|
||||
@ -367,10 +396,10 @@ if [ $# -gt 0 ]; then
|
||||
elif [[ "$1" == "composer" ]]; then
|
||||
shift 1
|
||||
e="composer $@" && run_exec php "$e"
|
||||
elif [[ "$1" == "super" ]]; then
|
||||
elif [[ "$1" == "service" ]]; then
|
||||
shift 1
|
||||
supervisorctl_restart "$@"
|
||||
elif [[ "$1" == "supervisorctl" ]]; then
|
||||
e="service $@" && run_exec php "$e"
|
||||
elif [[ "$1" == "super" ]] || [[ "$1" == "supervisorctl" ]]; then
|
||||
shift 1
|
||||
e="supervisorctl $@" && run_exec php "$e"
|
||||
elif [[ "$1" == "models" ]]; then
|
||||
|
@ -18,6 +18,8 @@ class DatabaseSeeder extends Seeder
|
||||
$this->call(FilesTableSeeder::class);
|
||||
$this->call(FileUsersTableSeeder::class);
|
||||
$this->call(ProjectColumnsTableSeeder::class);
|
||||
$this->call(ProjectFlowItemsTableSeeder::class);
|
||||
$this->call(ProjectFlowsTableSeeder::class);
|
||||
$this->call(ProjectLogsTableSeeder::class);
|
||||
$this->call(ProjectTaskContentsTableSeeder::class);
|
||||
$this->call(ProjectTaskUsersTableSeeder::class);
|
||||
|
388
database/seeders/ProjectFlowItemsTableSeeder.php
Normal file
388
database/seeders/ProjectFlowItemsTableSeeder.php
Normal 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',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
76
database/seeders/ProjectFlowsTableSeeder.php
Normal file
76
database/seeders/ProjectFlowsTableSeeder.php
Normal 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',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -28,6 +28,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 2,
|
||||
'column_id' => 2,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 1,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '说明:将进度分成多级
|
||||
每张卡片为一个项目任务,标签表示任务状况
|
||||
通过将卡片拖至不同的进度列表下,来表示各项目进度',
|
||||
@ -54,6 +56,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 2,
|
||||
'column_id' => 2,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 1,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '官网项目',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -78,6 +82,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 2,
|
||||
'column_id' => 2,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 1,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '新增职位需求',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -102,6 +108,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 2,
|
||||
'column_id' => 2,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 1,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '更新公司简介',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -126,6 +134,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 2,
|
||||
'column_id' => 3,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 1,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '官网项目四期',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -150,6 +160,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 2,
|
||||
'column_id' => 4,
|
||||
'dialog_id' => 16,
|
||||
'flow_item_id' => 1,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '官网项目三期',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -174,6 +186,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 2,
|
||||
'column_id' => 5,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 1,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '官网项目二期',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -198,6 +212,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 2,
|
||||
'column_id' => 6,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 3,
|
||||
'flow_item_name' => '已完成',
|
||||
'name' => '官网项目一期',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -222,6 +238,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 7,
|
||||
'dialog_id' => 18,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '免费高品质的Sketch资源',
|
||||
'color' => '',
|
||||
'desc' => 'https://sketchrepo.com/',
|
||||
@ -246,6 +264,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 7,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '免费高品质的PSD资源',
|
||||
'color' => '',
|
||||
'desc' => 'https://psdrepo.com/',
|
||||
@ -270,6 +290,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 7,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '免费高清灵感图片网(偏文艺)',
|
||||
'color' => '',
|
||||
'desc' => 'https://magdeleine.co/',
|
||||
@ -294,6 +316,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 7,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '每天发现充满灵感且美丽的图片',
|
||||
'color' => '',
|
||||
'desc' => 'https://weheartit.com/',
|
||||
@ -318,6 +342,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 8,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '花瓣网:设计师寻找灵感的天堂',
|
||||
'color' => '',
|
||||
'desc' => 'https://huaban.com/',
|
||||
@ -342,6 +368,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 8,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'WallHaven:高清壁纸图片搜索引擎',
|
||||
'color' => '',
|
||||
'desc' => 'https://wallhaven.typepad.com/',
|
||||
@ -366,6 +394,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 8,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Pexels:免费高品质图片 可商用',
|
||||
'color' => '',
|
||||
'desc' => 'https://www.pexels.com/',
|
||||
@ -390,6 +420,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 9,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Retinize:iOS切图神器',
|
||||
'color' => '',
|
||||
'desc' => 'http://retinize.it/',
|
||||
@ -414,6 +446,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 9,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'GuideGuide:一款PS参考线插件',
|
||||
'color' => '',
|
||||
'desc' => 'https://guideguide.me/photoshop/',
|
||||
@ -438,6 +472,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 9,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Assistor PS:一个功能强大的PS辅助工具',
|
||||
'color' => '',
|
||||
'desc' => 'http://wit-web.azurewebsites.net/assistor/download',
|
||||
@ -462,6 +498,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 10,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Fontello:图标字体生成器',
|
||||
'color' => '',
|
||||
'desc' => 'http://fontello.com/',
|
||||
@ -486,6 +524,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 10,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'inconfont: 免费提供高度可辨识符号图标',
|
||||
'color' => '',
|
||||
'desc' => 'https://www.iconfont.cn/',
|
||||
@ -510,6 +550,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 10,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'The Noun Project:免费提供高度可辨识符号图标',
|
||||
'color' => '',
|
||||
'desc' => 'https://thenounproject.com/',
|
||||
@ -534,6 +576,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 10,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'EasyIcon:免费图标搜索和下载平台',
|
||||
'color' => '',
|
||||
'desc' => 'https://www.easyicon.net/',
|
||||
@ -558,6 +602,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 10,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Icon Deposit:一个奇妙的图标下载站',
|
||||
'color' => '',
|
||||
'desc' => 'https://www.icondeposit.com/',
|
||||
@ -582,6 +628,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 10,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'iConify:Mac平台的苹果应用图标自动化生成工具',
|
||||
'color' => '',
|
||||
'desc' => 'https://iconify.net/',
|
||||
@ -606,6 +654,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 11,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Logaster:教你在线几分钟内搞定专业的LOGO',
|
||||
'color' => '',
|
||||
'desc' => '设计https://www.logaster.cn/',
|
||||
@ -630,6 +680,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 11,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'LogoLounge:国际知名的LOGO设计权威网站',
|
||||
'color' => '',
|
||||
'desc' => 'https://www.logolounge.com/',
|
||||
@ -654,6 +706,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 11,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'LogoMoose:一个优秀的logo素材站点',
|
||||
'color' => '',
|
||||
'desc' => 'https://www.logomoose.com/',
|
||||
@ -678,6 +732,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 11,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'LOGOED:一个展示Logo设计的博客',
|
||||
'color' => '',
|
||||
'desc' => 'http://www.logoed.co.uk/page/2/',
|
||||
@ -702,6 +758,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 11,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Logo of the Day:汇集世界各地优秀LOGO作品的站点',
|
||||
'color' => '',
|
||||
'desc' => 'https://logooftheday.com/',
|
||||
@ -726,6 +784,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 2,
|
||||
'column_id' => 5,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 1,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'asdasdad1111',
|
||||
'color' => '',
|
||||
'desc' => '7777777',
|
||||
@ -750,6 +810,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 2,
|
||||
'column_id' => 5,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 1,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'hjhjhjjh',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -774,6 +836,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 11,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Logo of the Day:汇集世界各地优秀LOGO作品的站点',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -798,6 +862,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 11,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'LogoDesignLove:Logo设计技巧分享网',
|
||||
'color' => '',
|
||||
'desc' => 'LogoDesignLove:Logo设计技巧分享网',
|
||||
@ -822,6 +888,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 11,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'LogoDesignLove:Logo设计技巧分享网',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -846,6 +914,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 12,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Coolors:自动生成配色色板的小工具',
|
||||
'color' => '',
|
||||
'desc' => 'https://coolors.co/',
|
||||
@ -870,6 +940,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 12,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Material Palette:Material Design专用在线配色工具',
|
||||
'color' => '',
|
||||
'desc' => 'https://www.materialpalette.com/',
|
||||
@ -894,6 +966,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 12,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Web安全色:WEB设计、开发中常用的安全颜色',
|
||||
'color' => '',
|
||||
'desc' => 'https://www.bootcss.com/p/websafecolors/',
|
||||
@ -918,6 +992,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 12,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'ColorZilla:火狐浏览器网页取色器插件',
|
||||
'color' => '',
|
||||
'desc' => 'https://www.colorzilla.com/',
|
||||
@ -942,6 +1018,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 12,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'Color Palette Generator:图片配色工具',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -966,6 +1044,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 12,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'inconfont: 免费提供高度可辨识符号图标',
|
||||
'color' => '',
|
||||
'desc' => 'https://www.iconfont.cn/',
|
||||
@ -990,6 +1070,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 12,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'inconfont: 免费提供高度可辨识符号图标https://www.iconfont.cn/',
|
||||
'color' => '',
|
||||
'desc' => 'https://www.iconfont.cn/',
|
||||
@ -1014,6 +1096,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 3,
|
||||
'column_id' => 12,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 5,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => 'https://www.iconfont.cn/',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1038,6 +1122,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 13,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '将收集箱的事务进行判断。要立即执行:进入Q2列表。非立即执行:判断——1.不做(删掉)、2.稍晚再做(进入「稍后做」)、3.可做可不做的任务或可能有用的资源(进入「Mark」列表)',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1062,6 +1148,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 13,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '2分钟内能做完贴上2分钟标签(进入「2分钟速战」列表)。2分钟以上做完的事务进入Q3',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1086,6 +1174,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 13,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '判断能否一步做完,能进入Q4,不能打上多步标签(进入「项目清单」);或将多步骤任务分解成多个一步做完任务,进入Q4。',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1110,6 +1200,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 13,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '如果自己做,打上自己做标签(进入「执行清单」);如果别人做,打上别人做标签(进入「等待清单」)。',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1134,6 +1226,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 2,
|
||||
'column_id' => 2,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 1,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '❓❗ 说明:将进度分成多级
|
||||
|
||||
每张卡片为一个项目任务,标签表示任务状况
|
||||
@ -1162,6 +1256,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 13,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '每天晚上复查整套流程',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1186,6 +1282,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 13,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '1.检查「收集箱」是否清空。',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1210,6 +1308,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 13,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '2.检查「Mark」是否有条目需要执行,转化成行动或项目。',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1234,6 +1334,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 13,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '3.检查「项目清单」了解项目进度。',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1258,6 +1360,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 13,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '4.检查「等待清单」是否有条目需要转化成行动,也就是催促。',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1282,6 +1386,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 13,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '5.检查各清单是否有已完成,完成的、已作废的卡片,立刻删除。',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1306,6 +1412,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 14,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '任何事务或信息,先以最简单的方式记录到“收集箱”。然后判断,贴上标签后,拖动到相应列表里',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1330,6 +1438,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 15,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '优先级1:立即去做的事',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1354,6 +1464,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 14,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '任何事务或信息,先以最简单的方式记录到“收集箱”。然后判断,贴上标签后,拖动到相应列表里',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1378,6 +1490,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 16,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '优先级2:主要的执行清单',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1402,6 +1516,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 17,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '优先级3:存放需要多步骤做的事,持续追踪',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1426,6 +1542,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 17,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '可以为这个多步骤项目单独建一个项目,并把项目的链接放到卡片的详情页里,点击就能跳转进去。',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1450,6 +1568,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 17,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '活动策划',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1474,6 +1594,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 16,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '填问卷',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1498,6 +1620,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 18,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '存放等待协同的事',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1522,6 +1646,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 18,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '设计稿反馈',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1546,6 +1672,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 18,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '存放等待协同的事',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1570,6 +1698,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 19,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '存放稍后做的任务',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1594,6 +1724,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 19,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '阅实习生简历',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1618,6 +1750,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 20,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '存放可做可不做的任务,以及各种可能用到的资源',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1642,6 +1776,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 4,
|
||||
'column_id' => 20,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 9,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '团建KTV',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1666,6 +1802,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 5,
|
||||
'column_id' => 21,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 13,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '产品新需求',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1690,6 +1828,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 5,
|
||||
'column_id' => 22,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 13,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '需要调研的需求',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1714,6 +1854,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 5,
|
||||
'column_id' => 23,
|
||||
'dialog_id' => 17,
|
||||
'flow_item_id' => 13,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '进入交互设计的需求',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1738,6 +1880,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 5,
|
||||
'column_id' => 25,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 13,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '设计稿(放入设计稿)',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1762,6 +1906,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 5,
|
||||
'column_id' => 25,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 13,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '提测(放入提测时间规划表)',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1786,6 +1932,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 5,
|
||||
'column_id' => 25,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 13,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '发布流程(放入发布流程,应用文案等)',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1810,6 +1958,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 5,
|
||||
'column_id' => 25,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 13,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '-----上线需求-----(将左边列表中的需求拖动至下方,表示本版本上线需求)',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1834,6 +1984,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 6,
|
||||
'column_id' => 26,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 17,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '将小组一年工作目标拆解,设置出里程碑时间节点。并指派相关责任人。用标签来展示进行状况',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1858,6 +2010,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 6,
|
||||
'column_id' => 27,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 19,
|
||||
'flow_item_name' => '已完成',
|
||||
'name' => '🚴 里程碑 1 需求评审完成,资源准备到位',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1882,6 +2036,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 6,
|
||||
'column_id' => 27,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 17,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '🚴 里程碑 2 设计完成,进行评审',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1906,6 +2062,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 6,
|
||||
'column_id' => 28,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 17,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '🚴 里程碑 3 产品开发完成,开始提测',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1930,6 +2088,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 6,
|
||||
'column_id' => 28,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 17,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '🚴 里程碑 4 测试完成准备线上发布',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1954,6 +2114,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 6,
|
||||
'column_id' => 28,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 17,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '测试1',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -1978,6 +2140,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 6,
|
||||
'column_id' => 28,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 17,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '测试2',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2002,6 +2166,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 6,
|
||||
'column_id' => 28,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 17,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '测试3',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2026,6 +2192,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 6,
|
||||
'column_id' => 29,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 17,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '🚴 里程碑 5 市场发布',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2050,6 +2218,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 7,
|
||||
'column_id' => 32,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 21,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '产品官网设计',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2074,6 +2244,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 7,
|
||||
'column_id' => 32,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 23,
|
||||
'flow_item_name' => '已完成',
|
||||
'name' => '首页',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2098,6 +2270,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 7,
|
||||
'column_id' => 32,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 23,
|
||||
'flow_item_name' => '已完成',
|
||||
'name' => '公司介绍',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2122,6 +2296,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 7,
|
||||
'column_id' => 32,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 23,
|
||||
'flow_item_name' => '已完成',
|
||||
'name' => '新闻动态',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2146,6 +2322,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 7,
|
||||
'column_id' => 32,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 23,
|
||||
'flow_item_name' => '已完成',
|
||||
'name' => '产品介绍',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2170,6 +2348,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 7,
|
||||
'column_id' => 32,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 23,
|
||||
'flow_item_name' => '已完成',
|
||||
'name' => '案例展示',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2194,6 +2374,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 7,
|
||||
'column_id' => 32,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 21,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '联系我们',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2218,6 +2400,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 7,
|
||||
'column_id' => 32,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 21,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '官网新增一级栏目,“招聘信息”',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2242,6 +2426,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 7,
|
||||
'column_id' => 33,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 21,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '产品官网',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
@ -2266,6 +2452,8 @@ class ProjectTasksTableSeeder extends Seeder
|
||||
'project_id' => 5,
|
||||
'column_id' => 24,
|
||||
'dialog_id' => 0,
|
||||
'flow_item_id' => 13,
|
||||
'flow_item_name' => '待处理',
|
||||
'name' => '版本的确定',
|
||||
'color' => '',
|
||||
'desc' => '',
|
||||
|
@ -4,6 +4,7 @@ services:
|
||||
php:
|
||||
container_name: "dootask-php-${APP_ID}"
|
||||
image: "kuaifan/php:swoole-8.0"
|
||||
shm_size: "1024m"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./docker/crontab/crontab.conf:/etc/supervisor/conf.d/crontab.conf
|
||||
|
121
electron/main.js
vendored
121
electron/main.js
vendored
@ -1,4 +1,5 @@
|
||||
const fs = require('fs')
|
||||
const fse = require('fs-extra')
|
||||
const os = require("os");
|
||||
const path = require('path')
|
||||
const XLSX = require('xlsx');
|
||||
@ -14,13 +15,49 @@ let mainWindow = null,
|
||||
devloadUrl = "",
|
||||
devloadCachePath = path.resolve(__dirname, ".devload"),
|
||||
downloadList = [],
|
||||
downloadCacheFile = path.join(app.getPath('cache'), config.name + '.downloadCache');
|
||||
downloadCacheFile = path.join(app.getPath('cache'), config.name, '.downloadCache');
|
||||
|
||||
if (fs.existsSync(devloadCachePath)) {
|
||||
devloadUrl = fs.readFileSync(devloadCachePath, 'utf8')
|
||||
}
|
||||
|
||||
if (fs.existsSync(downloadCacheFile)) {
|
||||
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() {
|
||||
@ -69,37 +106,12 @@ function createMainWindow() {
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.on('will-download', (event, item) => {
|
||||
item.setSavePath(path.join(app.getPath('cache'), item.getFilename()));
|
||||
item.on('done', (event, state) => {
|
||||
try {
|
||||
const info = {
|
||||
state,
|
||||
name: item.getFilename(),
|
||||
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) { }
|
||||
item.setSavePath(path.join(app.getPath('cache'), config.name, item.getFilename()));
|
||||
item.on('updated', () => {
|
||||
downloadUpdate(item)
|
||||
})
|
||||
item.on('done', () => {
|
||||
downloadUpdate(item)
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -201,26 +213,33 @@ ipcMain.on('inheritClose', (event) => {
|
||||
* @param args {url}
|
||||
*/
|
||||
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"
|
||||
//
|
||||
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)
|
||||
})
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.6.20",
|
||||
"version": "0.6.41",
|
||||
"description": "DooTask is task management system.",
|
||||
"main": "main.js",
|
||||
"license": "MIT",
|
||||
|
17
electron/utils.js
vendored
17
electron/utils.js
vendored
@ -252,4 +252,21 @@ module.exports = {
|
||||
let domain = (weburl + "").match(urlReg);
|
||||
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)
|
||||
},
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.6.20",
|
||||
"version": "0.6.41",
|
||||
"description": "DooTask is task management system.",
|
||||
"scripts": {
|
||||
"start": "./cmd dev",
|
||||
@ -64,7 +64,7 @@
|
||||
"stylus-loader": "^6.2.0",
|
||||
"tinymce": "^5.10.2",
|
||||
"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-clipboard2": "^0.3.3",
|
||||
"vue-emoji-picker": "^1.0.3",
|
||||
|
2
public/css/app.css
vendored
2
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/110.js
vendored
2
public/js/build/110.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/120.js
vendored
2
public/js/build/120.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* html2canvas 1.3.3 <https://html2canvas.hertzen.com>
|
||||
* Copyright (c) 2021 Niklas von Hertzen <https://hertzen.com>
|
||||
* html2canvas 1.4.0 <https://html2canvas.hertzen.com>
|
||||
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
||||
* Released under MIT License
|
||||
*/
|
||||
|
||||
|
2
public/js/build/198.js
vendored
2
public/js/build/198.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* 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>
|
||||
* @license MIT
|
||||
*/
|
||||
@ -304,7 +304,7 @@
|
||||
|
||||
/*! ./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 */
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
2
public/js/build/388.js
vendored
2
public/js/build/388.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/build/422.js
vendored
1
public/js/build/422.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/494.js
vendored
2
public/js/build/494.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/603.js
vendored
2
public/js/build/603.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/build/62.js
vendored
Normal file
1
public/js/build/62.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/js/build/631.js
vendored
Normal file
2
public/js/build/631.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/js/build/700.js
vendored
Normal file
1
public/js/build/700.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/js/build/79.js
vendored
2
public/js/build/79.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/793.js
vendored
2
public/js/build/793.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/build/834.js
vendored
Normal file
1
public/js/build/834.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/js/build/875.js
vendored
1
public/js/build/875.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/build/890.js
vendored
1
public/js/build/890.js
vendored
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@
|
||||
<div v-if="$Electron" class="common-app-down-link" @click="releasesNotification">
|
||||
<Icon type="md-download"/> {{$L(repoTitle)}}
|
||||
</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)}}
|
||||
</a>
|
||||
</div>
|
||||
@ -15,7 +15,6 @@ import MarkdownPreview from "./MDEditor/components/preview";
|
||||
import axios from "axios";
|
||||
Vue.component('MarkdownPreview', MarkdownPreview)
|
||||
|
||||
import {Store} from "le5le-store";
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
@ -26,19 +25,19 @@ export default {
|
||||
|
||||
repoName: 'kuaifan/dootask',
|
||||
repoData: {},
|
||||
repoStatus: 0, // 0 没有,1有客户端,2客户端有新版本
|
||||
repoReleases: {},
|
||||
|
||||
status: 0, // 0 没有,1有客户端,2客户端有新版本
|
||||
releases: {},
|
||||
downInfo: {},
|
||||
downloadResult: {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getReleases();
|
||||
//
|
||||
if (this.$Electron) {
|
||||
this.$Electron.ipcRenderer.on('downloadDone', (event, args) => {
|
||||
if (args.name == this.repoData.name) {
|
||||
this.downInfo = args;
|
||||
this.$Electron.ipcRenderer.on('downloadDone', (event, {result}) => {
|
||||
if (result.name == this.repoData.name) {
|
||||
this.downloadResult = result;
|
||||
this.releasesNotification()
|
||||
}
|
||||
})
|
||||
@ -49,10 +48,10 @@ export default {
|
||||
'wsOpenNum',
|
||||
]),
|
||||
repoTitle() {
|
||||
return this.status == 2 ? '更新客户端' : '客户端下载';
|
||||
return this.repoStatus == 2 ? '更新客户端' : '客户端下载';
|
||||
},
|
||||
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: {
|
||||
@ -108,7 +107,7 @@ export default {
|
||||
},
|
||||
|
||||
getReleases() {
|
||||
if (this.status > 0) {
|
||||
if (this.repoStatus > 0) {
|
||||
return;
|
||||
}
|
||||
if (this.loadIng > 0) {
|
||||
@ -116,10 +115,11 @@ export default {
|
||||
}
|
||||
//
|
||||
let cache = $A.getStorageJson("cacheAppdown");
|
||||
let timeout = 1800;
|
||||
let timeout = 600;
|
||||
if (cache.time && cache.time + timeout > Math.round(new Date().getTime() / 1000)) {
|
||||
this.releases = cache.data;
|
||||
this.repoReleases = cache.data;
|
||||
this.chackReleases()
|
||||
setTimeout(this.getReleases, timeout * 1000)
|
||||
return;
|
||||
}
|
||||
//
|
||||
@ -127,22 +127,24 @@ export default {
|
||||
axios.get("https://api.github.com/repos/" + this.repoName + "/releases/latest").then(({status, data}) => {
|
||||
this.loadIng--;
|
||||
if (status === 200) {
|
||||
$A.setStorage("cacheAppdown", {
|
||||
cache = {
|
||||
time: Math.round(new Date().getTime() / 1000),
|
||||
data: data
|
||||
});
|
||||
this.releases = data;
|
||||
this.chackReleases();
|
||||
setTimeout(this.getReleases, timeout)
|
||||
}
|
||||
$A.setStorage("cacheAppdown", cache);
|
||||
this.repoReleases = cache.data;
|
||||
this.chackReleases()
|
||||
}
|
||||
setTimeout(this.getReleases, timeout * 1000)
|
||||
}).catch(() => {
|
||||
this.loadIng--;
|
||||
setTimeout(this.getReleases, timeout * 1000)
|
||||
});
|
||||
},
|
||||
|
||||
chackReleases() {
|
||||
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"
|
||||
}
|
||||
if (this.$Electron) {
|
||||
@ -153,18 +155,18 @@ export default {
|
||||
}
|
||||
let artifactName = null;
|
||||
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') {
|
||||
artifactName = `${hostName}-${this.releases.tag_name}-win-${match[3]}.exe`;
|
||||
artifactName = `${hostName}-${this.repoReleases.tag_name}-win-${match[3]}.exe`;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
this.repoData = (this.releases.assets || []).find(({name}) => name == artifactName);
|
||||
this.repoData = (this.repoReleases.assets || []).find(({name}) => name == artifactName);
|
||||
if (!this.repoData) {
|
||||
return;
|
||||
}
|
||||
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) {
|
||||
// 有新版本
|
||||
console.log("New version: " + latestVersion);
|
||||
@ -174,26 +176,23 @@ export default {
|
||||
}
|
||||
} 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) {
|
||||
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);
|
||||
this.status = 1;
|
||||
this.repoStatus = 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
releasesNotification() {
|
||||
if (this.downInfo.state != "completed") {
|
||||
return;
|
||||
}
|
||||
$A.modalConfirm({
|
||||
okText: this.$L('立即更新'),
|
||||
onOk: () => {
|
||||
this.installApplication();
|
||||
},
|
||||
onCancel: () => {
|
||||
this.status = 2;
|
||||
this.repoStatus = 2;
|
||||
},
|
||||
render: (h) => {
|
||||
return h('div', {
|
||||
@ -209,12 +208,12 @@ export default {
|
||||
props: {
|
||||
color: 'volcano'
|
||||
}
|
||||
}, this.releases.tag_name)
|
||||
}, this.repoReleases.tag_name)
|
||||
]),
|
||||
h('MarkdownPreview', {
|
||||
class: 'notification-body',
|
||||
props: {
|
||||
initialValue: this.releases.body
|
||||
initialValue: this.repoReleases.body
|
||||
}
|
||||
}),
|
||||
])
|
||||
@ -227,7 +226,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.$Electron.ipcRenderer.send('openFile', {
|
||||
path: this.downInfo.savePath
|
||||
path: this.downloadResult.savePath
|
||||
});
|
||||
this.$Electron.ipcRenderer.send('windowQuit');
|
||||
}
|
||||
|
@ -1,29 +1,28 @@
|
||||
<template>
|
||||
<transition name="transition-drop">
|
||||
<div
|
||||
:data-transfer="transfer"
|
||||
:transfer="transfer"
|
||||
v-transfer-dom
|
||||
:class="['drawer-overlay', placement, value ? 'overlay-visible' : 'overlay-hide']">
|
||||
<div class="overlay-mask" @click="mask"></div>
|
||||
<div class="overlay-body" :style="bodyStyle">
|
||||
<div class="overlay-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">
|
||||
<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>
|
||||
</a>
|
||||
</div>
|
||||
<ResizeLine v-if="resize" class="overlay-resize" v-model="width" :max-width="0"/>
|
||||
<div class="overlay-content"><slot/></div>
|
||||
<div
|
||||
v-transfer-dom
|
||||
:data-transfer="transfer"
|
||||
:class="['drawer-overlay', placement, value ? 'overlay-visible' : 'overlay-hide']"
|
||||
:style="overlayStyle">
|
||||
<div class="overlay-mask" @click="mask"></div>
|
||||
<div class="overlay-body" :style="bodyStyle">
|
||||
<div class="overlay-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">
|
||||
<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>
|
||||
</a>
|
||||
</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>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ResizeLine from "./ResizeLine";
|
||||
import TransferDom from '../directives/transfer-dom';
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'DrawerOverlay',
|
||||
@ -52,6 +51,10 @@
|
||||
type: [Number, String],
|
||||
default: "100%"
|
||||
},
|
||||
minSize: {
|
||||
type: Number,
|
||||
default: 300
|
||||
},
|
||||
resize: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
@ -64,7 +67,8 @@
|
||||
|
||||
data() {
|
||||
return {
|
||||
width: 0
|
||||
dynamicSize: 0,
|
||||
zIndex: 0,
|
||||
}
|
||||
},
|
||||
|
||||
@ -77,8 +81,16 @@
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['cacheDrawerIndex']),
|
||||
|
||||
overlayStyle() {
|
||||
return {
|
||||
zIndex: 1000 + this.zIndex
|
||||
}
|
||||
},
|
||||
|
||||
bodyStyle() {
|
||||
let size = this.width;
|
||||
let size = this.dynamicSize;
|
||||
size = size <= 100 ? `${size}%` : `${size}px`
|
||||
if (this.placement == 'right') {
|
||||
return {
|
||||
@ -108,10 +120,16 @@
|
||||
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: {
|
||||
handler(val) {
|
||||
this.width = parseInt(val);
|
||||
this.dynamicSize = parseInt(val);
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
@ -124,17 +142,19 @@
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$emit("input", !this.value)
|
||||
this.$emit("input", false)
|
||||
},
|
||||
escClose(e) {
|
||||
if (this.value && this.escClosable) {
|
||||
if (e.keyCode === 27) {
|
||||
let show = false;
|
||||
$A(".ivu-modal").each((i, e) => {
|
||||
show = $(e).is(":visible");
|
||||
return !show;
|
||||
})
|
||||
!show && this.close()
|
||||
if (this.$Modal.visibles().length > 0) {
|
||||
return;
|
||||
}
|
||||
const list = this.$store.state.cacheDrawerOverlay;
|
||||
if (list.length > 0) {
|
||||
const $Drawer = list[list.length - 1]
|
||||
$Drawer.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<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>
|
||||
<style lang="scss" scoped>
|
||||
.component-resize-line {
|
||||
@ -19,6 +19,12 @@
|
||||
cursor: col-resize;
|
||||
}
|
||||
}
|
||||
&.bottom {
|
||||
cursor: row-resize;
|
||||
&:after {
|
||||
cursor: row-resize;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
@ -28,14 +34,24 @@
|
||||
props: {
|
||||
value: {
|
||||
},
|
||||
minWidth: {
|
||||
min: {
|
||||
type: Number,
|
||||
default: 100,
|
||||
},
|
||||
maxWidth: {
|
||||
max: {
|
||||
type: Number,
|
||||
default: 600,
|
||||
},
|
||||
placement: {
|
||||
validator (value) {
|
||||
return ['right', 'bottom'].includes(value)
|
||||
},
|
||||
default: 'bottom'
|
||||
},
|
||||
reverse: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
@ -47,7 +63,7 @@
|
||||
|
||||
offset: {},
|
||||
|
||||
tmpWidth: undefined,
|
||||
tmpSize: undefined,
|
||||
}
|
||||
},
|
||||
|
||||
@ -66,7 +82,7 @@
|
||||
};
|
||||
this.resizing = true;
|
||||
if (typeof this.value === 'number') {
|
||||
this.tmpWidth = this.value;
|
||||
this.tmpSize = this.value;
|
||||
}
|
||||
this.$emit('on-change', {
|
||||
event: 'down',
|
||||
@ -78,13 +94,18 @@
|
||||
}
|
||||
let diffX = (e.pageX || e.clientX + document.documentElement.scrollLeft) - this.mouseX;
|
||||
let diffY = (e.pageY || e.clientY + document.documentElement.scrollTop) - this.mouseY;
|
||||
if (typeof this.tmpWidth === 'number') {
|
||||
let value = this.tmpWidth + diffX;
|
||||
if (this.minWidth > 0) {
|
||||
value = Math.max(this.minWidth, value);
|
||||
if (typeof this.tmpSize === 'number') {
|
||||
let value;
|
||||
if (this.placement == 'bottom') {
|
||||
value = this.reverse ? (this.tmpSize - diffY) : (this.tmpSize + diffY);
|
||||
} else {
|
||||
value = this.reverse ? (this.tmpSize - diffX) : (this.tmpSize + diffX);
|
||||
}
|
||||
if (this.maxWidth > 0) {
|
||||
value = Math.min(this.maxWidth, value);
|
||||
if (this.min > 0) {
|
||||
value = Math.max(this.min, value);
|
||||
}
|
||||
if (this.max > 0) {
|
||||
value = Math.min(this.max, value);
|
||||
}
|
||||
this.$emit("input", value);
|
||||
}
|
||||
@ -99,7 +120,7 @@
|
||||
},
|
||||
handleUp() {
|
||||
this.resizing = false;
|
||||
this.tmpWidth = undefined;
|
||||
this.tmpSize = undefined;
|
||||
this.$emit('on-change', {
|
||||
event: 'up',
|
||||
});
|
||||
|
@ -196,7 +196,7 @@
|
||||
|
||||
openDialog() {
|
||||
this.goForward({path: '/manage/messenger'});
|
||||
this.$store.dispatch("openDialogUserid", this.userid);
|
||||
this.$store.dispatch("openDialogUserid", this.userid).catch(() => {})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -76,7 +76,7 @@ export default {
|
||||
this.getDemoAccount();
|
||||
//
|
||||
if (this.$Electron) {
|
||||
this.chackServerUrl();
|
||||
this.chackServerUrl().catch(() => {});
|
||||
} else {
|
||||
this.clearServerUrl();
|
||||
}
|
||||
|
@ -274,8 +274,8 @@ export default {
|
||||
$A.messageSuccess("清除成功");
|
||||
}
|
||||
//
|
||||
this.$store.dispatch("getUserInfo");
|
||||
this.$store.dispatch("getTaskPriority");
|
||||
this.$store.dispatch("getUserInfo").catch(() => {})
|
||||
this.$store.dispatch("getTaskPriority").catch(() => {})
|
||||
//
|
||||
this.notificationInit();
|
||||
this.onVisibilityChange();
|
||||
@ -635,7 +635,7 @@ export default {
|
||||
this.notificationClass.replaceTitle(data.name);
|
||||
this.notificationClass.userAgreed();
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -401,7 +401,7 @@ export default {
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}).catch(() => {})
|
||||
},
|
||||
|
||||
addDialogMsg() {
|
||||
|
@ -219,7 +219,7 @@ export default {
|
||||
}).then(() => {
|
||||
this.loadIng--;
|
||||
this.getLists();
|
||||
this.$store.dispatch("getProjectOne", row.id);
|
||||
this.$store.dispatch("getProjectOne", row.id).catch(() => {});
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
this.loadIng--;
|
||||
|
@ -785,7 +785,7 @@ export default {
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
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);
|
||||
}).catch(({msg}) => {
|
||||
this.$set(this.columnLoad, column.id, false);
|
||||
this.$store.dispatch("getColumns", this.projectId)
|
||||
this.$store.dispatch("getColumns", this.projectId).catch(() => {})
|
||||
$A.modalError(msg);
|
||||
});
|
||||
},
|
||||
@ -945,8 +945,8 @@ export default {
|
||||
$A.messageSuccess(msg);
|
||||
this.userLoad--;
|
||||
this.userShow = false;
|
||||
this.$store.dispatch("getProjectOne", this.projectId);
|
||||
this.$store.dispatch("getTaskForProject", this.projectId)
|
||||
this.$store.dispatch("getProjectOne", this.projectId).catch(() => {});
|
||||
this.$store.dispatch("getTaskForProject", this.projectId).catch(() => {})
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
this.userLoad--;
|
||||
@ -965,8 +965,8 @@ export default {
|
||||
$A.messageSuccess(msg);
|
||||
this.transferLoad--;
|
||||
this.transferShow = false;
|
||||
this.$store.dispatch("getProjectOne", this.projectId);
|
||||
this.$store.dispatch("getTaskForProject", this.projectId)
|
||||
this.$store.dispatch("getProjectOne", this.projectId).catch(() => {});
|
||||
this.$store.dispatch("getTaskForProject", this.projectId).catch(() => {})
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
this.transferLoad--;
|
||||
|
@ -270,7 +270,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initLanguage() {
|
||||
|
||||
|
||||
},
|
||||
|
||||
initCascaderData() {
|
||||
@ -321,7 +321,7 @@ export default {
|
||||
this.addData.project_id = column.project_id;
|
||||
this.addData.column_id = column.id;
|
||||
}
|
||||
});
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -376,13 +376,14 @@
|
||||
class="dialog-input"
|
||||
v-model="msgText"
|
||||
type="textarea"
|
||||
:disabled="sendLoad > 0"
|
||||
:rows="1"
|
||||
:autosize="{ minRows: 1, maxRows: 3 }"
|
||||
:maxlength="255"
|
||||
:placeholder="$L('输入消息...')"
|
||||
@on-keydown="msgKeydown"/>
|
||||
<div class="no-send" @click="openSend">
|
||||
<Loading v-if="sendLoad"/>
|
||||
<Loading v-if="sendLoad > 0"/>
|
||||
<Icon v-else type="md-send" />
|
||||
</div>
|
||||
</div>
|
||||
@ -458,7 +459,7 @@ export default {
|
||||
navActive: 'dialog',
|
||||
logLoadIng: false,
|
||||
|
||||
sendLoad: false,
|
||||
sendLoad: 0,
|
||||
|
||||
taskPlugins: [
|
||||
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
|
||||
@ -828,7 +829,7 @@ export default {
|
||||
this.ownerLoad--;
|
||||
this.ownerShow = false;
|
||||
this.receiveShow = false;
|
||||
this.$store.dispatch("getTaskOne", this.taskDetail.id);
|
||||
this.$store.dispatch("getTaskOne", this.taskDetail.id).catch(() => {})
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
this.ownerLoad--;
|
||||
@ -859,7 +860,7 @@ export default {
|
||||
$A.messageSuccess(msg);
|
||||
this.assistLoad--;
|
||||
this.assistShow = false;
|
||||
this.$store.dispatch("getTaskOne", this.taskDetail.id);
|
||||
this.$store.dispatch("getTaskOne", this.taskDetail.id).catch(() => {})
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
this.assistLoad--;
|
||||
@ -1007,6 +1008,11 @@ export default {
|
||||
if (!this.msgText) {
|
||||
return;
|
||||
}
|
||||
if (this.sendLoad > 0) {
|
||||
return;
|
||||
}
|
||||
this.sendLoad++;
|
||||
//
|
||||
this.$store.dispatch("call", {
|
||||
url: 'project/task/dialog',
|
||||
data: {
|
||||
@ -1014,56 +1020,60 @@ export default {
|
||||
},
|
||||
}).then(({data}) => {
|
||||
this.$store.dispatch("saveTask", data);
|
||||
this.$store.dispatch("getDialogOne", data.dialog_id);
|
||||
if ($A.isSubElectron) {
|
||||
this.resizeDialog();
|
||||
return;
|
||||
}
|
||||
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 = "";
|
||||
this.$store.dispatch("getDialogOne", data.dialog_id).then(() => {
|
||||
this.sendLoad--;
|
||||
if ($A.isSubElectron) {
|
||||
this.resizeDialog();
|
||||
} else {
|
||||
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 = "";
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(({msg}) => {
|
||||
this.sendLoad--;
|
||||
$A.modalError(msg);
|
||||
});
|
||||
}).catch(({msg}) => {
|
||||
this.sendLoad--;
|
||||
$A.modalError(msg);
|
||||
});
|
||||
},
|
||||
|
||||
openSend() {
|
||||
if (this.sendLoad) {
|
||||
if (this.sendLoad > 0) {
|
||||
return;
|
||||
}
|
||||
this.sendLoad = true;
|
||||
this.sendLoad++;
|
||||
//
|
||||
this.$store.dispatch("call", {
|
||||
url: 'project/task/dialog',
|
||||
data: {
|
||||
task_id: this.taskDetail.id,
|
||||
},
|
||||
}).then(({data}) => {
|
||||
this.sendLoad = false;
|
||||
this.sendLoad--;
|
||||
this.$store.dispatch("saveTask", data);
|
||||
this.$store.dispatch("getDialogOne", data.dialog_id);
|
||||
this.$store.dispatch("getDialogOne", data.dialog_id).catch(() => {})
|
||||
if ($A.isSubElectron) {
|
||||
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}) => {
|
||||
this.sendLoad = false;
|
||||
this.sendLoad--;
|
||||
$A.modalError(msg);
|
||||
});
|
||||
},
|
||||
@ -1128,10 +1138,8 @@ export default {
|
||||
if (this.$refs.dialog || num > 20) {
|
||||
clearInterval(interval);
|
||||
if (this.$refs.dialog) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dialog.sendMsg(this.msgText);
|
||||
this.msgText = "";
|
||||
})
|
||||
this.$refs.dialog.sendMsg(this.msgText);
|
||||
this.msgText = "";
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
|
@ -57,7 +57,7 @@
|
||||
</div>
|
||||
</EDropdownItem>
|
||||
<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">
|
||||
<i class="taskfont" :style="{color:c.color||'#f9f9f9'}" v-html="c.color == task.color ? '' : ''"></i>{{$L(c.name)}}
|
||||
</div>
|
||||
@ -162,7 +162,7 @@ export default {
|
||||
// 修改背景色
|
||||
this.updateTask({
|
||||
color: command.color
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -172,7 +172,7 @@ export default {
|
||||
if (flow_item_id == this.task.flow_item_id) return;
|
||||
this.updateTask({
|
||||
flow_item_id
|
||||
})
|
||||
}).catch(() => {})
|
||||
return;
|
||||
}
|
||||
const cacheTask = this.task;
|
||||
@ -218,7 +218,7 @@ export default {
|
||||
|
||||
visibleChange(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)
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
this.$store.dispatch("getTaskOne", this.task.id);
|
||||
this.$store.dispatch("getTaskOne", this.task.id).catch(() => {})
|
||||
reject()
|
||||
});
|
||||
})
|
||||
|
@ -188,7 +188,7 @@ export default {
|
||||
// 修改列表
|
||||
el[0].updateTask({
|
||||
column_id: $A.leftDelete(command, 'column::')
|
||||
})
|
||||
}).catch(() => {})
|
||||
return;
|
||||
}
|
||||
if ($A.leftExists(command, 'priority::')) {
|
||||
@ -199,7 +199,7 @@ export default {
|
||||
p_level: data.priority,
|
||||
p_name: data.name,
|
||||
p_color: data.color,
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -321,21 +321,20 @@ export default {
|
||||
},
|
||||
|
||||
operationUser(data) {
|
||||
let that = this;
|
||||
return new Promise(function (resolve) {
|
||||
that.loadIng++;
|
||||
that.$store.dispatch("call", {
|
||||
return new Promise((resolve) => {
|
||||
this.loadIng++;
|
||||
this.$store.dispatch("call", {
|
||||
url: 'users/operation',
|
||||
data,
|
||||
}).then(({msg}) => {
|
||||
$A.messageSuccess(msg);
|
||||
that.loadIng--;
|
||||
that.getLists();
|
||||
this.loadIng--;
|
||||
this.getLists();
|
||||
resolve()
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg, 301);
|
||||
that.loadIng--;
|
||||
that.getLists();
|
||||
this.loadIng--;
|
||||
this.getLists();
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
|
@ -57,8 +57,8 @@ export default {
|
||||
setTimeout(() => {
|
||||
this.$store.state.projectId = $A.runNum(id);
|
||||
this.$store.dispatch("getProjectOne", id).then(() => {
|
||||
this.$store.dispatch("getColumns", id);
|
||||
this.$store.dispatch("getTaskForProject", id);
|
||||
this.$store.dispatch("getColumns", id).catch(() => {});
|
||||
this.$store.dispatch("getTaskForProject", id).catch(() => {})
|
||||
}).catch(({msg}) => {
|
||||
$A.modalWarning({
|
||||
content: msg,
|
||||
|
@ -82,7 +82,7 @@ export default {
|
||||
}).then(() => {
|
||||
$A.messageSuccess('修改成功');
|
||||
this.loadIng--;
|
||||
this.$store.dispatch('getUserInfo');
|
||||
this.$store.dispatch('getUserInfo').catch(() => {});
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
this.loadIng--;
|
||||
|
@ -70,7 +70,7 @@ export default {
|
||||
this.taskInfo = data;
|
||||
this.$store.dispatch("getTaskContent", task_id);
|
||||
this.$store.dispatch("getTaskFiles", task_id);
|
||||
this.$store.dispatch("getTaskForParent", task_id);
|
||||
this.$store.dispatch("getTaskForParent", task_id).catch(() => {})
|
||||
}).catch(({msg}) => {
|
||||
this.loadIng--;
|
||||
$A.modalError({
|
||||
|
134
resources/assets/js/store/actions.js
vendored
134
resources/assets/js/store/actions.js
vendored
@ -171,7 +171,7 @@ export default {
|
||||
* @param dispatch
|
||||
*/
|
||||
getBasicData({dispatch}) {
|
||||
dispatch("getProjects");
|
||||
dispatch("getProjects").catch(() => {});
|
||||
dispatch("getDialogs");
|
||||
dispatch("getTaskForDashboard");
|
||||
},
|
||||
@ -383,7 +383,7 @@ export default {
|
||||
* @returns {Promise<unknown>}
|
||||
*/
|
||||
handleClearCache({state, dispatch}, userInfo) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
return new Promise(function (resolve) {
|
||||
try {
|
||||
const cacheLoginEmail = $A.getStorageString("cacheLoginEmail");
|
||||
//
|
||||
@ -402,7 +402,7 @@ export default {
|
||||
//
|
||||
resolve()
|
||||
} catch (e) {
|
||||
reject(e)
|
||||
resolve()
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -651,7 +651,7 @@ export default {
|
||||
resolve(result)
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
dispatch("getProjectOne", project_id);
|
||||
dispatch("getProjectOne", project_id).catch(() => {})
|
||||
reject(e)
|
||||
});
|
||||
});
|
||||
@ -679,7 +679,7 @@ export default {
|
||||
resolve(result)
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
dispatch("getProjectOne", project_id);
|
||||
dispatch("getProjectOne", project_id).catch(() => {})
|
||||
reject(e)
|
||||
});
|
||||
});
|
||||
@ -707,7 +707,7 @@ export default {
|
||||
resolve(result)
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
dispatch("getProjectOne", project_id);
|
||||
dispatch("getProjectOne", project_id).catch(() => {})
|
||||
reject(e)
|
||||
});
|
||||
});
|
||||
@ -758,11 +758,11 @@ export default {
|
||||
let index = state.cacheColumns.findIndex(column => column.id == id);
|
||||
if (index > -1) {
|
||||
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);
|
||||
}
|
||||
})
|
||||
Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id))
|
||||
Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id).catch(() => {}))
|
||||
//
|
||||
setTimeout(() => {
|
||||
$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)) {
|
||||
dispatch("getTaskOne", data.parent_id);
|
||||
dispatch("getTaskOne", data.parent_id).catch(() => {})
|
||||
}
|
||||
if (updateMarking.is_update_project === true) {
|
||||
dispatch("getProjectOne", data.project_id);
|
||||
dispatch("getProjectOne", data.project_id).catch(() => {})
|
||||
}
|
||||
if (updateMarking.is_update_content === true) {
|
||||
dispatch("getTaskContent", data.id);
|
||||
}
|
||||
if (updateMarking.is_update_subtask === true) {
|
||||
dispatch("getTaskForParent", data.id);
|
||||
dispatch("getTaskForParent", data.id).catch(() => {})
|
||||
}
|
||||
//
|
||||
setTimeout(() => {
|
||||
@ -922,8 +922,8 @@ export default {
|
||||
state.cacheTasks.splice(index, 1);
|
||||
}
|
||||
})
|
||||
Array.from(new Set(parent_ids)).some(id => dispatch("getTaskOne", id))
|
||||
Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id))
|
||||
Array.from(new Set(parent_ids)).some(id => dispatch("getTaskOne", id).catch(() => {}))
|
||||
Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id).catch(() => {}))
|
||||
//
|
||||
if (ids.includes(state.taskId)) {
|
||||
state.taskId = 0;
|
||||
@ -1158,7 +1158,7 @@ export default {
|
||||
resolve(result)
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
dispatch("getTaskOne", task_id);
|
||||
dispatch("getTaskOne", task_id).catch(() => {})
|
||||
dispatch("taskLoadEnd", task_id)
|
||||
reject(e)
|
||||
});
|
||||
@ -1190,7 +1190,7 @@ export default {
|
||||
resolve(result)
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
dispatch("getTaskOne", task_id)
|
||||
dispatch("getTaskOne", task_id).catch(() => {})
|
||||
dispatch("taskLoadEnd", task_id)
|
||||
reject(e)
|
||||
});
|
||||
@ -1202,31 +1202,25 @@ export default {
|
||||
* @param state
|
||||
* @param dispatch
|
||||
* @param task_id
|
||||
* @returns {Promise<unknown>}
|
||||
*/
|
||||
getTaskContent({state, dispatch}, task_id) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
if ($A.runNum(task_id) === 0) {
|
||||
reject({msg: 'Parameter error'});
|
||||
return;
|
||||
if ($A.runNum(task_id) === 0) {
|
||||
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", {
|
||||
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)
|
||||
}
|
||||
resolve(result)
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
reject(e);
|
||||
});
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
});
|
||||
},
|
||||
|
||||
@ -1235,37 +1229,31 @@ export default {
|
||||
* @param state
|
||||
* @param dispatch
|
||||
* @param task_id
|
||||
* @returns {Promise<unknown>}
|
||||
*/
|
||||
getTaskFiles({state, dispatch}, task_id) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
if ($A.runNum(task_id) === 0) {
|
||||
reject({msg: 'Parameter error'});
|
||||
return;
|
||||
}
|
||||
dispatch("call", {
|
||||
url: 'project/task/files',
|
||||
data: {
|
||||
task_id,
|
||||
},
|
||||
}).then(result => {
|
||||
result.data.forEach((data) => {
|
||||
let index = state.taskFiles.findIndex(({id}) => id == data.id)
|
||||
if (index > -1) {
|
||||
state.taskFiles.splice(index, 1, data)
|
||||
} else {
|
||||
state.taskFiles.push(data)
|
||||
}
|
||||
})
|
||||
dispatch("saveTask", {
|
||||
id: task_id,
|
||||
file_num: result.data.length
|
||||
});
|
||||
resolve(result)
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
reject(e);
|
||||
if ($A.runNum(task_id) === 0) {
|
||||
return;
|
||||
}
|
||||
dispatch("call", {
|
||||
url: 'project/task/files',
|
||||
data: {
|
||||
task_id,
|
||||
},
|
||||
}).then(result => {
|
||||
result.data.forEach((data) => {
|
||||
let index = state.taskFiles.findIndex(({id}) => id == data.id)
|
||||
if (index > -1) {
|
||||
state.taskFiles.splice(index, 1, data)
|
||||
} else {
|
||||
state.taskFiles.push(data)
|
||||
}
|
||||
})
|
||||
dispatch("saveTask", {
|
||||
id: task_id,
|
||||
file_num: result.data.length
|
||||
});
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
});
|
||||
},
|
||||
|
||||
@ -1305,7 +1293,7 @@ export default {
|
||||
dispatch("getTaskOne", task_id).then(() => {
|
||||
dispatch("getTaskContent", task_id);
|
||||
dispatch("getTaskFiles", task_id);
|
||||
dispatch("getTaskForParent", task_id);
|
||||
dispatch("getTaskForParent", task_id).catch(() => {})
|
||||
}).catch(({msg}) => {
|
||||
$A.modalWarning({
|
||||
content: msg,
|
||||
@ -1375,7 +1363,7 @@ export default {
|
||||
delete task.new_column
|
||||
}
|
||||
dispatch("saveTask", task)
|
||||
dispatch("getProjectOne", task.project_id);
|
||||
dispatch("getProjectOne", task.project_id).catch(() => {})
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1400,7 +1388,7 @@ export default {
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
dispatch("taskLoadEnd", post.task_id)
|
||||
dispatch("getTaskOne", post.task_id);
|
||||
dispatch("getTaskOne", post.task_id).catch(() => {})
|
||||
reject(e)
|
||||
});
|
||||
}).catch(reject)
|
||||
@ -1679,7 +1667,7 @@ export default {
|
||||
last_at: $A.formatDate("Y-m-d H:i:s")
|
||||
});
|
||||
} else {
|
||||
dispatch("getDialogOne", data.dialog_id);
|
||||
dispatch("getDialogOne", data.dialog_id).catch(() => {})
|
||||
}
|
||||
},
|
||||
|
||||
@ -2060,15 +2048,15 @@ export default {
|
||||
dispatch("saveProject", data)
|
||||
break;
|
||||
case 'detail':
|
||||
dispatch("getProjectOne", data.id);
|
||||
dispatch("getTaskForProject", data.id)
|
||||
dispatch("getProjectOne", data.id).catch(() => {})
|
||||
dispatch("getTaskForProject", data.id).catch(() => {})
|
||||
break;
|
||||
case 'archived':
|
||||
case 'delete':
|
||||
dispatch("forgetProject", data.id);
|
||||
break;
|
||||
case 'sort':
|
||||
dispatch("getTaskForProject", data.id)
|
||||
dispatch("getTaskForProject", data.id).catch(() => {})
|
||||
break;
|
||||
}
|
||||
})(msgDetail);
|
||||
@ -2107,7 +2095,7 @@ export default {
|
||||
break;
|
||||
case 'dialog':
|
||||
dispatch("saveTask", data)
|
||||
dispatch("getDialogOne", data.dialog_id)
|
||||
dispatch("getDialogOne", data.dialog_id).catch(() => {})
|
||||
break;
|
||||
case 'upload':
|
||||
dispatch("getTaskFiles", data.task_id)
|
||||
|
3
resources/assets/js/store/state.js
vendored
3
resources/assets/js/store/state.js
vendored
@ -8,6 +8,9 @@ state.windowMax768 = window.innerWidth <= 768;
|
||||
|
||||
// 数据缓存
|
||||
state.cacheLoading = {};
|
||||
|
||||
// DrawerOverlay
|
||||
state.cacheDrawerIndex = 0;
|
||||
state.cacheDrawerOverlay = [];
|
||||
|
||||
// User
|
||||
|
@ -28,7 +28,8 @@
|
||||
}
|
||||
.notification-body {
|
||||
max-height: 210px;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
margin: 18px 0;
|
||||
.markdown-preview {
|
||||
margin: -20px -12px;
|
||||
|
@ -7,7 +7,7 @@
|
||||
z-index: 1000;
|
||||
box-sizing: border-box;
|
||||
pointer-events: none;
|
||||
background: rgba(0, 0, 0, 0.76);
|
||||
background: rgba(10, 10, 10, 0.76);
|
||||
outline: none;
|
||||
opacity: 0;
|
||||
display: flex;
|
||||
|
2
version.js
vendored
2
version.js
vendored
@ -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) {
|
||||
console.error(err);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user