编辑发起变更获取字段为空判断修改
This commit is contained in:
@@ -41,7 +41,7 @@ export function useRouterPush(inSetup = true) {
|
||||
const meta = allRoutes.find(item => item.name === key)?.meta || null;
|
||||
// 处理 my_initiatechange 路由,如果 id 存在,直接跳转
|
||||
// 判断发起变更是否是编辑
|
||||
if(route.value?.name==='my_initiatechange' && route.value?.query?.id){
|
||||
if(meta?.title==='发起变更' && route.value?.query?.id){
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -590,8 +590,8 @@ defineExpose({form, questions, applyAiResult, generateLevel: useAiLevel})
|
||||
<div class="flex flex-1 flex-wrap items-center gap-2 rounded-lg bg-slate-50 px-3 py-2">
|
||||
<NButton size="small" round v-for="t in RISK_TOOLS_FORM" :key="t.key" @click="toggleTool(t)" title="点击选用 / 取消;AI 辅助分析在各工具插件内使用"
|
||||
class="text-sm"
|
||||
:ghost="form.risk_tools.includes(t.key) ? false : true"
|
||||
:type="form.risk_tools.includes(t.key) ? 'primary' : 'default'"
|
||||
:ghost="form.risk_tools?.includes(t.key) ? false : true"
|
||||
:type="form.risk_tools?.includes(t.key) ? 'primary' : 'default'"
|
||||
>
|
||||
{{ t.label }}
|
||||
</NButton>
|
||||
|
||||
@@ -25,7 +25,7 @@ const generateLoading = ref<boolean>(false);
|
||||
// 风险预分析loading
|
||||
const analyzing = ref<boolean>(false);
|
||||
// 是否显示险预分析
|
||||
const preRiskShow = computed(() => form.value.severity !== '' || form.value.probability !== '' || form.value.protection !== '');
|
||||
const preRiskShow = computed(() => form.value.severity || form.value.probability || form.value.protection);
|
||||
// 是否显示变更识别结果
|
||||
const identifyShow = computed(() => form.value.compare_rows.length > 0);
|
||||
// 表单
|
||||
@@ -134,7 +134,7 @@ watch(() => props.currentForm, (newVal:any) => {
|
||||
<Icon icon="lucide:sparkles" class="size-16px text-violet-500" />
|
||||
<span class="font-semibold text-base ml-2">变更内容描述</span>
|
||||
</div>
|
||||
<NButton ghost type="primary" @click="runIdentify" :disabled="btnDisabled || !form.description.trim()">
|
||||
<NButton ghost type="primary" @click="runIdentify" :disabled="btnDisabled || !form.description?.trim()">
|
||||
<Icon v-if="preLoading" icon="ri:loader-4-fill" class="size-16px animate-spin" />
|
||||
<Icon v-else icon="fluent:wand-24-regular" class="size-16px" />
|
||||
变更识别
|
||||
|
||||
Reference in New Issue
Block a user