mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-27 21:28:12 +00:00
no message
This commit is contained in:
parent
dda603c7d8
commit
b64d4fd96f
@ -32,7 +32,7 @@
|
||||
"dayjs": "^1.11.13",
|
||||
"dexie": "^3.2.3",
|
||||
"echarts": "^5.2.2",
|
||||
"element-sea": "^2.15.10-7",
|
||||
"element-sea": "^2.15.10-8",
|
||||
"file-loader": "^6.2.0",
|
||||
"highlight.js": "^11.7.0",
|
||||
"inquirer": "^8.2.0",
|
||||
|
||||
@ -10,17 +10,16 @@
|
||||
@visible-change="visibleChange">
|
||||
<div ref="icon" class="general-operation-icon"></div>
|
||||
<EDropdownMenu ref="dropdownMenu" slot="dropdown" class="general-operation-more-dropdown menu-dropdown">
|
||||
<li class="general-operation-more-warp" :class="[size]">
|
||||
<li class="general-operation-more-warp" :class="size">
|
||||
<ul :style="ulStyle">
|
||||
<EDropdownItem
|
||||
v-for="(item, key) in list"
|
||||
:key="key"
|
||||
:class="item.className"
|
||||
:command="item.value"
|
||||
:divided="!!item.divided"
|
||||
:disabled="(active === item.value && !activeClick) || !!item.disabled">
|
||||
<div class="item-box">
|
||||
<div class="item">{{item.label}}</div>
|
||||
<div class="item-box" :style="item.style" :class="item.className">
|
||||
<div class="item">{{language ? $L(item.label) : item.label}}</div>
|
||||
<div v-if="tickShow" class="tick">
|
||||
<i v-if="active === item.value && !item.disabled" class="taskfont"></i>
|
||||
</div>
|
||||
@ -40,13 +39,14 @@ export default {
|
||||
visible: false,
|
||||
|
||||
list: [], // 数据列表: [{label: '', value: ''}]
|
||||
active: '', // 当前选中的值
|
||||
size: 'small', // 下拉框大小
|
||||
active: '', // 当前选中的值
|
||||
activeClick: false, // 当前选中的值是否可以被点击
|
||||
onUpdate: null, // 选中后的回调函数
|
||||
scrollHide: true, // 滚动立即隐藏
|
||||
tickShow: true, // 是否显示打勾
|
||||
tickShow: true, // 是否显示打勾(默认为:true,如果 active === undefined 默认为:false)
|
||||
maxHeight: 0, // 滚动区域最大高度
|
||||
language: true, // 是否国际化 item.label
|
||||
|
||||
element: null,
|
||||
target: null,
|
||||
@ -83,13 +83,14 @@ export default {
|
||||
height: `${eventRect.height}px`,
|
||||
}
|
||||
this.list = data.list;
|
||||
this.active = data.active && this.list.find(item => item.value === data.active) ? data.active : '';
|
||||
this.size = ['small', 'medium', 'large'].includes(data.size) ? data.size : 'small';
|
||||
this.active = data.active && this.list.find(item => item.value === data.active) ? data.active : '';
|
||||
this.activeClick = typeof data.activeClick === "boolean" ? data.activeClick : false;
|
||||
this.onUpdate = typeof data.onUpdate === "function" ? data.onUpdate : null;
|
||||
this.scrollHide = typeof data.scrollHide === "boolean" ? data.scrollHide : true;
|
||||
this.tickShow = typeof data.tickShow === "boolean" ? data.tickShow : true;
|
||||
this.tickShow = typeof data.tickShow === "boolean" ? data.tickShow : (typeof data.active !== "undefined");
|
||||
this.maxHeight = typeof data.maxHeight === "number" ? data.maxHeight : 0;
|
||||
this.language = typeof data.language === "boolean" ? data.language : true;
|
||||
//
|
||||
this.$refs.icon.focus();
|
||||
this.show();
|
||||
|
||||
@ -240,7 +240,7 @@ export default {
|
||||
}
|
||||
])
|
||||
}
|
||||
this.$store.state.menuOperation = {
|
||||
this.$store.commit('menu/operation', {
|
||||
event,
|
||||
list,
|
||||
onUpdate: async (act) => {
|
||||
@ -259,7 +259,7 @@ export default {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleView(item) {
|
||||
//查看
|
||||
|
||||
@ -1572,22 +1572,23 @@ export default {
|
||||
if (type === 'transcription') {
|
||||
// 语音转文字
|
||||
list.unshift(...[
|
||||
{label: '选择识别语言', value: '', disabled: true},
|
||||
{label: '自动识别', value: '', divided: true},
|
||||
{label: this.$L('选择识别语言'), value: '', disabled: true},
|
||||
{label: this.$L('自动识别'), value: '', divided: true},
|
||||
])
|
||||
active = this.cacheTranscriptionLanguage
|
||||
} else {
|
||||
// 翻译
|
||||
list.unshift(...[
|
||||
{label: '选择翻译结果', value: '', disabled: true},
|
||||
{label: '不翻译结果', value: '', divided: true},
|
||||
{label: this.$L('选择翻译结果'), value: '', disabled: true},
|
||||
{label: this.$L('不翻译结果'), value: '', divided: true},
|
||||
])
|
||||
active = this.recordConvertTranslate
|
||||
}
|
||||
this.$store.state.menuOperation = {
|
||||
this.$store.commit('menu/operation', {
|
||||
event,
|
||||
list,
|
||||
active,
|
||||
language: false,
|
||||
onUpdate: async (language) => {
|
||||
if (type === 'transcription') {
|
||||
await this.$store.dispatch('setTranscriptionLanguage', language)
|
||||
@ -1596,7 +1597,7 @@ export default {
|
||||
}
|
||||
this.convertRecord()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
convertSend(type) {
|
||||
|
||||
@ -1874,10 +1874,11 @@ export default {
|
||||
if (!active && item.config?.model) {
|
||||
active = item.config.model
|
||||
}
|
||||
this.$store.state.menuOperation = {
|
||||
this.$store.commit('menu/operation', {
|
||||
event,
|
||||
list,
|
||||
active,
|
||||
language: false,
|
||||
onUpdate: async model => {
|
||||
this.dialogAiModel = [
|
||||
...this.dialogAiModel.filter(({dialog_id}) => dialog_id !== this.dialogId),
|
||||
@ -1885,7 +1886,7 @@ export default {
|
||||
]
|
||||
await $A.IDBSet('dialogAiModel', this.dialogAiModel)
|
||||
}
|
||||
}
|
||||
})
|
||||
break;
|
||||
|
||||
// 开启新会话
|
||||
@ -3541,20 +3542,21 @@ export default {
|
||||
value: item
|
||||
}))
|
||||
list.push(...[
|
||||
{label: '重新翻译', value: 'retranslation', divided: true},
|
||||
{label: '隐藏翻译', value: 'hidden'},
|
||||
{label: this.$L('重新翻译'), value: 'retranslation', divided: true},
|
||||
{label: this.$L('隐藏翻译'), value: 'hidden'},
|
||||
])
|
||||
this.$store.state.menuOperation = {
|
||||
this.$store.commit('menu/operation', {
|
||||
event,
|
||||
list,
|
||||
active: this.cacheTranslationLanguage,
|
||||
language: false,
|
||||
onUpdate: async (language) => {
|
||||
if (languageList[language]) {
|
||||
await this.$store.dispatch("setTranslationLanguage", language);
|
||||
}
|
||||
this.onTranslation(language);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onCopy(data) {
|
||||
|
||||
@ -555,7 +555,7 @@ export default {
|
||||
{label: '任务人员', value: 2},
|
||||
{label: '指定成员', value: 3},
|
||||
];
|
||||
this.$store.state.menuOperation = {
|
||||
this.$store.commit('menu/operation', {
|
||||
event,
|
||||
list,
|
||||
size: 'large',
|
||||
@ -563,7 +563,7 @@ export default {
|
||||
onUpdate: (value) => {
|
||||
this.dropVisible(value)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
visibleUserSelectShowChange(isShow){
|
||||
|
||||
@ -1917,7 +1917,7 @@ export default {
|
||||
{label: '任务人员', value: 2},
|
||||
{label: '指定成员', value: 3},
|
||||
];
|
||||
this.$store.state.menuOperation = {
|
||||
this.$store.commit('menu/operation', {
|
||||
event,
|
||||
list,
|
||||
size: 'large',
|
||||
@ -1925,7 +1925,7 @@ export default {
|
||||
onUpdate: (value) => {
|
||||
this.dropVisible(value)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
showAtDropdown(event){
|
||||
@ -1935,14 +1935,14 @@ export default {
|
||||
{label: '修改时间', value: 2},
|
||||
{label: '清除时间', value: 3},
|
||||
];
|
||||
this.$store.state.menuOperation = {
|
||||
this.$store.commit('menu/operation', {
|
||||
event,
|
||||
list,
|
||||
size: 'large',
|
||||
onUpdate: (value) => {
|
||||
this.dropDeadline(value)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
visibleUserSelectShowChange(isShow){
|
||||
@ -2033,16 +2033,16 @@ export default {
|
||||
const list = [
|
||||
{label: '查看附件', value: 1},
|
||||
{label: '下载附件', value: 2},
|
||||
{label: '删除附件', value: 3, className: 'task-calc-warn-text'},
|
||||
{label: '删除附件', value: 3, style: {color:'#FF7070'}},
|
||||
];
|
||||
this.$store.state.menuOperation = {
|
||||
this.$store.commit('menu/operation', {
|
||||
event,
|
||||
list,
|
||||
size: 'large',
|
||||
onUpdate: (value) => {
|
||||
this.dropFile(value)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
dropFile(command) {
|
||||
@ -2113,16 +2113,17 @@ export default {
|
||||
if (this.msgTypes.length === 0) {
|
||||
return
|
||||
}
|
||||
this.$store.state.menuOperation = {
|
||||
this.$store.commit('menu/operation', {
|
||||
event,
|
||||
list: this.msgTypes,
|
||||
active: this.msgType,
|
||||
activeClick: true,
|
||||
language: false,
|
||||
onUpdate: (type) => {
|
||||
this.navActive = 'dialog'
|
||||
this.$refs.dialog?.onMsgType(type)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
autoScrollInto() {
|
||||
|
||||
5
resources/assets/js/store/mutations.js
vendored
5
resources/assets/js/store/mutations.js
vendored
@ -293,4 +293,9 @@ export default {
|
||||
'longpress/clear': function(state) {
|
||||
state.longpressData = {type: '', data: null, element: null}
|
||||
},
|
||||
|
||||
// 通用菜单
|
||||
'menu/operation': function(state, data) {
|
||||
state.menuOperation = data
|
||||
},
|
||||
}
|
||||
|
||||
@ -947,10 +947,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.task-calc-warn-text {
|
||||
color: $flow-status-start-color !important;
|
||||
}
|
||||
|
||||
body.window-portrait {
|
||||
.task-detail {
|
||||
.task-info {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user