mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-01 10:28:13 +00:00
perf: 任务详情页可见性选项默认不显示
This commit is contained in:
parent
87669010e3
commit
925667d840
@ -38,7 +38,7 @@ class SystemController extends AbstractController
|
|||||||
* @apiParam {String} type
|
* @apiParam {String} type
|
||||||
* - get: 获取(默认)
|
* - get: 获取(默认)
|
||||||
* - all: 获取所有(需要管理员权限)
|
* - all: 获取所有(需要管理员权限)
|
||||||
* - save: 保存设置(参数:['reg', 'reg_identity', 'reg_invite', 'login_code', 'password_policy', 'project_invite', 'chat_information', 'anon_message', 'auto_archived', 'archived_day', 'all_group_mute', 'all_group_autoin', 'image_compress', 'image_save_local', 'start_home', 'home_footer'])
|
* - save: 保存设置(参数:['reg', 'reg_identity', 'reg_invite', 'login_code', 'password_policy', 'project_invite', 'chat_information', 'anon_message', 'auto_archived', 'archived_day', 'task_visible', 'all_group_mute', 'all_group_autoin', 'image_compress', 'image_save_local', 'start_home', 'home_footer'])
|
||||||
|
|
||||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||||
@ -65,6 +65,7 @@ class SystemController extends AbstractController
|
|||||||
'anon_message',
|
'anon_message',
|
||||||
'auto_archived',
|
'auto_archived',
|
||||||
'archived_day',
|
'archived_day',
|
||||||
|
'task_visible',
|
||||||
'all_group_mute',
|
'all_group_mute',
|
||||||
'all_group_autoin',
|
'all_group_autoin',
|
||||||
'image_compress',
|
'image_compress',
|
||||||
@ -104,6 +105,7 @@ class SystemController extends AbstractController
|
|||||||
$setting['anon_message'] = $setting['anon_message'] ?: 'open';
|
$setting['anon_message'] = $setting['anon_message'] ?: 'open';
|
||||||
$setting['auto_archived'] = $setting['auto_archived'] ?: 'close';
|
$setting['auto_archived'] = $setting['auto_archived'] ?: 'close';
|
||||||
$setting['archived_day'] = floatval($setting['archived_day']) ?: 7;
|
$setting['archived_day'] = floatval($setting['archived_day']) ?: 7;
|
||||||
|
$setting['task_visible'] = $setting['task_visible'] ?: 'close';
|
||||||
$setting['all_group_mute'] = $setting['all_group_mute'] ?: 'open';
|
$setting['all_group_mute'] = $setting['all_group_mute'] ?: 'open';
|
||||||
$setting['all_group_autoin'] = $setting['all_group_autoin'] ?: 'yes';
|
$setting['all_group_autoin'] = $setting['all_group_autoin'] ?: 'yes';
|
||||||
$setting['image_compress'] = $setting['image_compress'] ?: 'open';
|
$setting['image_compress'] = $setting['image_compress'] ?: 'open';
|
||||||
|
|||||||
@ -201,7 +201,7 @@
|
|||||||
:add-icon="false"
|
:add-icon="false"
|
||||||
:before-submit="onAssist"/>
|
:before-submit="onAssist"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem>
|
<FormItem v-if="taskDetail.is_all_visible > 1 || visibleForce || visibleKeep">
|
||||||
<div class="item-label" slot="label">
|
<div class="item-label" slot="label">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
<EDropdown ref="eDropdownRef" trigger="click" placement="bottom" @command="dropVisible">
|
<EDropdown ref="eDropdownRef" trigger="click" placement="bottom" @command="dropVisible">
|
||||||
@ -511,6 +511,8 @@ export default {
|
|||||||
assistData: {},
|
assistData: {},
|
||||||
assistLoad: 0,
|
assistLoad: 0,
|
||||||
|
|
||||||
|
visibleForce: false,
|
||||||
|
|
||||||
addsubForce: false,
|
addsubForce: false,
|
||||||
addsubShow: false,
|
addsubShow: false,
|
||||||
addsubName: "",
|
addsubName: "",
|
||||||
@ -605,12 +607,16 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState([
|
||||||
|
'systemConfig',
|
||||||
|
|
||||||
'cacheProjects',
|
'cacheProjects',
|
||||||
'cacheColumns',
|
'cacheColumns',
|
||||||
'cacheTasks',
|
'cacheTasks',
|
||||||
|
|
||||||
'taskContents',
|
'taskContents',
|
||||||
'taskFiles',
|
'taskFiles',
|
||||||
'taskPriority',
|
'taskPriority',
|
||||||
|
|
||||||
'dialogId',
|
'dialogId',
|
||||||
]),
|
]),
|
||||||
|
|
||||||
@ -751,6 +757,13 @@ export default {
|
|||||||
name: '协助人员',
|
name: '协助人员',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (taskDetail.is_all_visible <= 1 && !this.visibleKeep) {
|
||||||
|
list.push({
|
||||||
|
command: 'visible',
|
||||||
|
icon: '',
|
||||||
|
name: '可见性',
|
||||||
|
});
|
||||||
|
}
|
||||||
if (!taskDetail.end_at) {
|
if (!taskDetail.end_at) {
|
||||||
list.push({
|
list.push({
|
||||||
command: 'times',
|
command: 'times',
|
||||||
@ -794,7 +807,11 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
return text
|
return text
|
||||||
}
|
},
|
||||||
|
|
||||||
|
visibleKeep() {
|
||||||
|
return this.systemConfig.task_visible === 'open' // 可见性保持显示
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
@ -819,6 +836,7 @@ export default {
|
|||||||
this.timeForce = false;
|
this.timeForce = false;
|
||||||
this.loopForce = false;
|
this.loopForce = false;
|
||||||
this.assistForce = false;
|
this.assistForce = false;
|
||||||
|
this.visibleForce = false;
|
||||||
this.addsubForce = false;
|
this.addsubForce = false;
|
||||||
this.receiveShow = false;
|
this.receiveShow = false;
|
||||||
this.$refs.chatInput && this.$refs.chatInput.hidePopover();
|
this.$refs.chatInput && this.$refs.chatInput.hidePopover();
|
||||||
@ -1249,6 +1267,13 @@ export default {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'visible':
|
||||||
|
this.visibleForce = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.showCisibleDropdown();
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
case 'times':
|
case 'times':
|
||||||
this.timeForce = true;
|
this.timeForce = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
@ -78,6 +78,14 @@
|
|||||||
<div slot="content">{{$L('任务完成 (*) 天后自动归档。', formDatum.archived_day)}}</div>
|
<div slot="content">{{$L('任务完成 (*) 天后自动归档。', formDatum.archived_day)}}</div>
|
||||||
</ETooltip>
|
</ETooltip>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
<FormItem :label="$L('可见性选项')" prop="taskVisible">
|
||||||
|
<RadioGroup v-model="formDatum.task_visible">
|
||||||
|
<Radio label="open">{{$L('保持')}}</Radio>
|
||||||
|
<Radio label="close">{{$L('自动')}}</Radio>
|
||||||
|
</RadioGroup>
|
||||||
|
<div v-if="formDatum.task_visible == 'open'" class="form-tip">{{$L('保持:任务详情页可见性选项保持显示。')}}</div>
|
||||||
|
<div v-else-if="formDatum.task_visible == 'close'" class="form-tip">{{$L('自动:默认值情况下显示在合并项目,设置时保持显示。')}}</div>
|
||||||
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="block-setting-box">
|
<div class="block-setting-box">
|
||||||
|
|||||||
@ -897,6 +897,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {languageList, languageType, setLanguage, addLanguage} from "../language";
|
import {languageList, languageType, setLanguage, addLanguage} from "../language";
|
||||||
import UpdateLog from "./manage/components/UpdateLog";
|
import UpdateLog from "./manage/components/UpdateLog";
|
||||||
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {UpdateLog},
|
components: {UpdateLog},
|
||||||
@ -911,7 +912,6 @@ export default {
|
|||||||
body2: true,
|
body2: true,
|
||||||
|
|
||||||
contactShow: false,
|
contactShow: false,
|
||||||
systemConfig: {},
|
|
||||||
|
|
||||||
showItem: {
|
showItem: {
|
||||||
pro: false,
|
pro: false,
|
||||||
@ -1070,11 +1070,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getSetting();
|
|
||||||
this.getShowItem();
|
this.getShowItem();
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(['systemConfig']),
|
||||||
appTitle() {
|
appTitle() {
|
||||||
return `${this.$L('选择适合你的')} ${window.systemInfo.title || "DooTask"}`;
|
return `${this.$L('选择适合你的')} ${window.systemInfo.title || "DooTask"}`;
|
||||||
},
|
},
|
||||||
@ -1089,14 +1089,6 @@ export default {
|
|||||||
this.goForward({name: 'index', query: {action: 'index'}});
|
this.goForward({name: 'index', query: {action: 'index'}});
|
||||||
},
|
},
|
||||||
|
|
||||||
getSetting() {
|
|
||||||
this.$store.dispatch("call", {
|
|
||||||
url: 'system/setting',
|
|
||||||
}).then(({data}) => {
|
|
||||||
this.systemConfig = data;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
getShowItem() {
|
getShowItem() {
|
||||||
this.$store.dispatch("call", {
|
this.$store.dispatch("call", {
|
||||||
url: "system/get/showitem",
|
url: "system/get/showitem",
|
||||||
|
|||||||
7
resources/assets/js/store/actions.js
vendored
7
resources/assets/js/store/actions.js
vendored
@ -94,6 +94,13 @@ export default {
|
|||||||
state.apiKeyData = data;
|
state.apiKeyData = data;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 系统设置
|
||||||
|
dispatch("call", {
|
||||||
|
url: 'system/setting',
|
||||||
|
}).then(({data}) => {
|
||||||
|
state.systemConfig = data;
|
||||||
|
})
|
||||||
|
|
||||||
// 加载语言包
|
// 加载语言包
|
||||||
await $A.loadScriptS([
|
await $A.loadScriptS([
|
||||||
`language/web/key.js`,
|
`language/web/key.js`,
|
||||||
|
|||||||
3
resources/assets/js/store/state.js
vendored
3
resources/assets/js/store/state.js
vendored
@ -192,6 +192,9 @@ export default {
|
|||||||
localKeyPair: {},
|
localKeyPair: {},
|
||||||
localKeyLock: false,
|
localKeyLock: false,
|
||||||
|
|
||||||
|
// 系统设置
|
||||||
|
systemConfig: {},
|
||||||
|
|
||||||
// 审批待办未读数量
|
// 审批待办未读数量
|
||||||
approveUnreadNumber: 0,
|
approveUnreadNumber: 0,
|
||||||
|
|
||||||
|
|||||||
@ -659,7 +659,7 @@
|
|||||||
.project-log {
|
.project-log {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
.logs-activity {
|
.logs-activity {
|
||||||
padding: 22px 0 0;
|
padding: 13px 0 0;
|
||||||
> li {
|
> li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
@ -773,7 +773,7 @@
|
|||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
.logs-activity {
|
.logs-activity {
|
||||||
padding: 22px 0 0 10px;
|
padding: 13px 0 0 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user