Merge branch 'jie' into main

pull/1/head
lizijiee 1 year ago
commit 4b6feec32b

@ -15,6 +15,7 @@ import { cloneDeep, debounce } from 'lodash-es'
import Masonry from 'masonry-layout'
import { useMessage } from 'naive-ui'
import { computed, nextTick, onMounted, onUnmounted, onUpdated, reactive, ref, unref, watch } from 'vue'
import FinishPackageModal from './modal/FinishPackageModal.vue'
import GeneratePackageModal from './modal/GeneratePackageModal.vue'
import LoginSuccessModal from './modal/LoginSuccessModal.vue'
import PackageSettingsModal from './modal/PackageSettingsModal.vue'
@ -36,6 +37,7 @@ const packageModalRef = ref(null)
const generateModalRef = ref(null)
const queryRepeatedTasksModalRef = ref(null)
const LoginSuccessModalRef = ref(null)
const finishPackageModal = ref(null)
const loading = ref(false)
const message = useMessage()
const totalCount = ref(0)
@ -244,11 +246,13 @@ async function commitHandler(settingParam) {
checkDuplicateNo: checkDuplicateNo.value
}
const modal = generateModalRef.value as any
const finishModal = finishPackageModal.value as any
modal.showModal()
createPackage(params).then((res) => {
if (res.code === "OK") {
message.success(res.data);
modal.closeModal()
finishModal.showModal()
}
})
const asideVal = configStore.getAsideValue
@ -463,6 +467,7 @@ function previewHandler(index: number, event: MouseEvent) {
<GeneratePackageModal ref="generateModalRef" />
<QueryRepeatedTasksModal ref="queryRepeatedTasksModalRef" />
<LoginSuccessModal ref="LoginSuccessModalRef" />
<FinishPackageModal ref="finishPackageModal" />
</div>
</template>

@ -0,0 +1,81 @@
<script lang="ts" setup>
import { defineOptions, ref } from 'vue';
import { useRouter } from 'vue-router';
defineOptions({ name: 'ShortcutModal' })
const show = ref(false)
const router = useRouter()
const cardStyle = {
'width': '29vw',
'--n-padding-bottom': '10px',
'--n-padding-left': '10px',
}
function showModal() {
show.value = true
}
function closeModal(path) {
show.value = false
router.push(path)
}
defineExpose({
showModal,
})
</script>
<template>
<div>
<n-modal v-model:show="show" transform-origin="center" style="padding: 8px;">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
<div style="display: flex;">
<div><svg-icon size="80" name="robot2" /></div>
<div style="height: 130px;text-align: center;margin-left: 20px;">
<div class="msg-title">生成任务提示</div>
<div class="msg-text">AI已根据您的配置要求生成任务包</div>
</div>
</div>
<template #footer>
<div class="wrapper-footer">
<n-button type="info" @click="closeModal('/worksheet')">
进入AI工单
</n-button>
<n-button style="margin-left:10px;color: #666666;" @click="closeModal('/task')">
进入任务审批
</n-button>
</div>
</template>
</n-card>
</n-modal>
</div>
</template>
<style lang="less" scoped>
.wrapper-footer {
margin-top: -20px;
text-align: right;
}
.msg-title {
font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: Medium;
text-align: left;
color: #333333;
line-height: 24px;
margin: 12px 0;
}
.msg-text {
font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular;
text-align: left;
color: #666666;
line-height: 22px;
}
</style>
Loading…
Cancel
Save