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