feat(系统设置): 自定义机器人非xpack
This commit is contained in:
parent
29eb6ca709
commit
7a4ed691f6
|
@ -161,29 +161,6 @@ public class FunctionalCaseMinderService {
|
||||||
return customFields.stream().map(TemplateCustomFieldDTO::getFieldId).toList();
|
return customFields.stream().map(TemplateCustomFieldDTO::getFieldId).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<FunctionalMinderTreeDTO> buildAdditionalData(String moduleId) {
|
|
||||||
List<FunctionalMinderTreeDTO> list = new ArrayList<>();
|
|
||||||
MindAdditionalNodeExample mindAdditionalNodeExample = new MindAdditionalNodeExample();
|
|
||||||
mindAdditionalNodeExample.createCriteria().andParentIdEqualTo(moduleId);
|
|
||||||
mindAdditionalNodeExample.setOrderByClause("pos asc");
|
|
||||||
List<MindAdditionalNode> mindAdditionalNodes = mindAdditionalNodeMapper.selectByExample(mindAdditionalNodeExample);
|
|
||||||
if (CollectionUtils.isEmpty(mindAdditionalNodes)) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
for (MindAdditionalNode mindAdditionalNode : mindAdditionalNodes) {
|
|
||||||
FunctionalMinderTreeDTO root = new FunctionalMinderTreeDTO();
|
|
||||||
FunctionalMinderTreeNodeDTO rootData = new FunctionalMinderTreeNodeDTO();
|
|
||||||
rootData.setId(mindAdditionalNode.getId());
|
|
||||||
rootData.setPos(mindAdditionalNode.getPos());
|
|
||||||
rootData.setText(mindAdditionalNode.getName());
|
|
||||||
rootData.setResource(new ArrayList<>());
|
|
||||||
root.setChildren(buildAdditionalData(mindAdditionalNode.getId()));
|
|
||||||
root.setData(rootData);
|
|
||||||
list.add(root);
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void buildList(List<FunctionalCaseMindDTO> functionalCaseMindDTOList, List<FunctionalMinderTreeDTO> list, Map<String, String> priorityMap) {
|
private void buildList(List<FunctionalCaseMindDTO> functionalCaseMindDTOList, List<FunctionalMinderTreeDTO> list, Map<String, String> priorityMap) {
|
||||||
//构造父子级数据
|
//构造父子级数据
|
||||||
for (FunctionalCaseMindDTO functionalCaseMindDTO : functionalCaseMindDTOList) {
|
for (FunctionalCaseMindDTO functionalCaseMindDTO : functionalCaseMindDTOList) {
|
||||||
|
|
|
@ -212,8 +212,10 @@
|
||||||
const unReadCount = ref<number>(0);
|
const unReadCount = ref<number>(0);
|
||||||
|
|
||||||
async function checkMessageRead() {
|
async function checkMessageRead() {
|
||||||
|
if (appStore.currentProjectId) {
|
||||||
unReadCount.value = await getMessageUnReadCount(appStore.currentProjectId);
|
unReadCount.value = await getMessageUnReadCount(appStore.currentProjectId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
watch(
|
watch(
|
||||||
() => appStore.currentOrgId,
|
() => appStore.currentOrgId,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
|
@ -130,7 +130,6 @@
|
||||||
{{ platform.name }}
|
{{ platform.name }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-xpack
|
|
||||||
:class="['platform-card-custom', robotForm.platform === 'CUSTOM' ? 'platform-card--active' : '']"
|
:class="['platform-card-custom', robotForm.platform === 'CUSTOM' ? 'platform-card--active' : '']"
|
||||||
@click="robotForm.platform = 'CUSTOM'"
|
@click="robotForm.platform = 'CUSTOM'"
|
||||||
>
|
>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{{ t('project.messageManagement.DING_TALK') }}
|
{{ t('project.messageManagement.DING_TALK') }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<a-form class="ms-form rounded-[4px]" :model="dingTalkForm" layout="vertical">
|
<a-form ref="dingTalkFormRef" class="ms-form rounded-[4px]" :model="dingTalkForm" layout="vertical">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
field="appKey"
|
field="appKey"
|
||||||
:label="t('system.config.qrCodeConfig.appKey')"
|
:label="t('system.config.qrCodeConfig.appKey')"
|
||||||
|
@ -82,6 +82,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { FormInstance, ValidatedError } from '@arco-design/web-vue';
|
||||||
|
|
||||||
import { getDingInfo, saveDingTalkConfig, validateDingTalkConfig } from '@/api/modules/setting/qrCode';
|
import { getDingInfo, saveDingTalkConfig, validateDingTalkConfig } from '@/api/modules/setting/qrCode';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
|
@ -100,6 +101,8 @@
|
||||||
valid: false,
|
valid: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const dingTalkFormRef = ref<FormInstance | null>(null);
|
||||||
|
|
||||||
const loading = ref<boolean>(false);
|
const loading = ref<boolean>(false);
|
||||||
const detailVisible = ref<boolean>(false);
|
const detailVisible = ref<boolean>(false);
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
@ -140,6 +143,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
async function validateInfo() {
|
async function validateInfo() {
|
||||||
|
dingTalkFormRef.value?.validate(async (errors: Record<string, ValidatedError> | undefined) => {
|
||||||
|
if (!errors) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
await validateDingTalkConfig(dingTalkForm.value);
|
await validateDingTalkConfig(dingTalkForm.value);
|
||||||
|
@ -151,8 +156,12 @@
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function saveInfo() {
|
async function saveInfo() {
|
||||||
|
dingTalkFormRef.value?.validate(async (errors: Record<string, ValidatedError> | undefined) => {
|
||||||
|
if (!errors) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
await saveDingTalkConfig(dingTalkForm.value);
|
await saveDingTalkConfig(dingTalkForm.value);
|
||||||
|
@ -165,6 +174,8 @@
|
||||||
detailVisible.value = false;
|
detailVisible.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{{ t('project.messageManagement.WE_COM') }}
|
{{ t('project.messageManagement.WE_COM') }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<a-form class="ms-form rounded-[4px]" :model="weComForm" layout="vertical">
|
<a-form ref="weComFormRef" class="ms-form rounded-[4px]" :model="weComForm" layout="vertical">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
field="corpId"
|
field="corpId"
|
||||||
:label="t('system.config.qrCodeConfig.corpId')"
|
:label="t('system.config.qrCodeConfig.corpId')"
|
||||||
|
@ -79,6 +79,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { FormInstance, ValidatedError } from '@arco-design/web-vue';
|
||||||
|
|
||||||
import { getWeComInfo, saveWeComConfig, validateWeComConfig } from '@/api/modules/setting/qrCode';
|
import { getWeComInfo, saveWeComConfig, validateWeComConfig } from '@/api/modules/setting/qrCode';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
|
@ -97,6 +98,8 @@
|
||||||
valid: false,
|
valid: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const weComFormRef = ref<FormInstance | null>(null);
|
||||||
|
|
||||||
const emits = defineEmits<{
|
const emits = defineEmits<{
|
||||||
(event: 'update:visible', visible: boolean): void;
|
(event: 'update:visible', visible: boolean): void;
|
||||||
(event: 'success'): void;
|
(event: 'success'): void;
|
||||||
|
@ -137,6 +140,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
async function validateInfo() {
|
async function validateInfo() {
|
||||||
|
weComFormRef.value?.validate(async (errors: Record<string, ValidatedError> | undefined) => {
|
||||||
|
if (!errors) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
await validateWeComConfig(weComForm.value);
|
await validateWeComConfig(weComForm.value);
|
||||||
|
@ -148,8 +153,12 @@
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function saveInfo() {
|
async function saveInfo() {
|
||||||
|
weComFormRef.value?.validate(async (errors: Record<string, ValidatedError> | undefined) => {
|
||||||
|
if (!errors) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
await saveWeComConfig(weComForm.value);
|
await saveWeComConfig(weComForm.value);
|
||||||
|
@ -162,6 +171,8 @@
|
||||||
detailVisible.value = false;
|
detailVisible.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
Loading…
Reference in New Issue