|
|
@ -1,6 +1,7 @@
|
|
|
|
<script lang="ts" setup>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import type { FormInst, FormItemRule, FormRules } from 'naive-ui'
|
|
|
|
import type { FormInst, FormItemRule, FormRules } from 'naive-ui'
|
|
|
|
import { computed, defineOptions, onBeforeMount, reactive, ref, unref, watch,h } from 'vue'
|
|
|
|
import { computed, defineOptions, h, onBeforeMount, reactive, ref, unref, watch } from 'vue'
|
|
|
|
|
|
|
|
import { forEach } from 'lodash'
|
|
|
|
import { asideMap } from '@/config/aside'
|
|
|
|
import { asideMap } from '@/config/aside'
|
|
|
|
import { useDictionary } from '@/store/modules/dictonary'
|
|
|
|
import { useDictionary } from '@/store/modules/dictonary'
|
|
|
|
import { useConfig } from '@/store/modules/asideConfig'
|
|
|
|
import { useConfig } from '@/store/modules/asideConfig'
|
|
|
@ -68,9 +69,11 @@ const rules: FormRules = {
|
|
|
|
message: '请选择逻辑关系',
|
|
|
|
message: '请选择逻辑关系',
|
|
|
|
trigger: 'blur',
|
|
|
|
trigger: 'blur',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
conditions: {
|
|
|
|
// conditions: {
|
|
|
|
|
|
|
|
// required: true,
|
|
|
|
},
|
|
|
|
// message: '请选择结果数据',
|
|
|
|
|
|
|
|
// trigger: 'blur',
|
|
|
|
|
|
|
|
// },
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const formRef = ref<FormInst | null>(null)
|
|
|
|
const formRef = ref<FormInst | null>(null)
|
|
|
@ -106,6 +109,12 @@ function handleSumbit(e: MouseEvent) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (const index in list) {
|
|
|
|
|
|
|
|
console.info(list)
|
|
|
|
|
|
|
|
if (list[index].searchvalue == undefined || list[index].searchvalue == '')
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const param: FilterCondition = {
|
|
|
|
const param: FilterCondition = {
|
|
|
|
searchname: formValue.name!,
|
|
|
|
searchname: formValue.name!,
|
|
|
|
type: 0,
|
|
|
|
type: 0,
|
|
|
@ -116,16 +125,15 @@ function handleSumbit(e: MouseEvent) {
|
|
|
|
addCondition(param)
|
|
|
|
addCondition(param)
|
|
|
|
else updateCondition({ id: currentEditId!, ...param })
|
|
|
|
else updateCondition({ id: currentEditId!, ...param })
|
|
|
|
console.log(editValue.value)
|
|
|
|
console.log(editValue.value)
|
|
|
|
let obj=editValue.value
|
|
|
|
const obj = editValue.value
|
|
|
|
if(currentStatus.value != 'new'){
|
|
|
|
if (currentStatus.value != 'new')
|
|
|
|
obj.searchname = param.searchname
|
|
|
|
obj.searchname = param.searchname
|
|
|
|
// obj.ocrUsersearchchildList=param.ocrUsersearchchildList
|
|
|
|
// obj.ocrUsersearchchildList=param.ocrUsersearchchildList
|
|
|
|
}
|
|
|
|
|
|
|
|
emit('handleOk', obj)
|
|
|
|
emit('handleOk', obj)
|
|
|
|
|
|
|
|
|
|
|
|
if(currentStatus.value != 'new'){
|
|
|
|
if (currentStatus.value != 'new')
|
|
|
|
emit('select', currentEditId)
|
|
|
|
emit('select', currentEditId)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
closeModal()
|
|
|
|
closeModal()
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -153,8 +161,9 @@ function unformatValue(searchfield: string, searchvalue: any) {
|
|
|
|
const start = formatToDate3(dataStrs[0])
|
|
|
|
const start = formatToDate3(dataStrs[0])
|
|
|
|
const end = formatToDate3(dataStrs[1])
|
|
|
|
const end = formatToDate3(dataStrs[1])
|
|
|
|
return [start, end]
|
|
|
|
return [start, end]
|
|
|
|
}else if(searchfield !="izsimilarity"){
|
|
|
|
}
|
|
|
|
searchvalue= searchvalue.split(",");
|
|
|
|
else if (searchfield != 'izsimilarity') {
|
|
|
|
|
|
|
|
searchvalue = searchvalue.split(',')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 80,90
|
|
|
|
// 80,90
|
|
|
@ -302,13 +311,12 @@ function edit(editFilter: any) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function createTimeForNumber(type) {
|
|
|
|
function createTimeForNumber(type) {
|
|
|
|
console.log(formValue.name)
|
|
|
|
console.log(formValue.name)
|
|
|
|
if(formValue.name){
|
|
|
|
if (formValue.name)
|
|
|
|
return ``}
|
|
|
|
return ``
|
|
|
|
else{
|
|
|
|
else
|
|
|
|
return `请输入标题内容`
|
|
|
|
return `请输入标题内容`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const inputNumberFeedback = createTimeForNumber(1)
|
|
|
|
let inputNumberFeedback= createTimeForNumber(1)
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
defineExpose({
|
|
|
|
showModal,
|
|
|
|
showModal,
|
|
|
|
edit,
|
|
|
|
edit,
|
|
|
@ -317,11 +325,11 @@ watch(
|
|
|
|
() => formValue.name,
|
|
|
|
() => formValue.name,
|
|
|
|
(newVal) => {
|
|
|
|
(newVal) => {
|
|
|
|
console.log(formValue.name)
|
|
|
|
console.log(formValue.name)
|
|
|
|
if(formValue.name){
|
|
|
|
if (formValue.name)
|
|
|
|
createTimeForNumber(0)
|
|
|
|
createTimeForNumber(0)
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
createTimeForNumber(1)
|
|
|
|
createTimeForNumber(1)
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
)
|
|
|
|
)
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
@ -419,9 +427,9 @@ if(formValue.name){
|
|
|
|
|
|
|
|
|
|
|
|
<n-select
|
|
|
|
<n-select
|
|
|
|
v-else
|
|
|
|
v-else
|
|
|
|
|
|
|
|
v-model:value="item.result"
|
|
|
|
:max-tag-count="1"
|
|
|
|
:max-tag-count="1"
|
|
|
|
:multiple="item.type != 'izyear' && item.type != 'izsimilarity'"
|
|
|
|
:multiple="item.type != 'izyear' && item.type != 'izsimilarity'"
|
|
|
|
v-model:value="item.result"
|
|
|
|
|
|
|
|
filterable
|
|
|
|
filterable
|
|
|
|
style="margin-left: 8px"
|
|
|
|
style="margin-left: 8px"
|
|
|
|
placeholder="请选择"
|
|
|
|
placeholder="请选择"
|
|
|
@ -430,9 +438,9 @@ if(formValue.name){
|
|
|
|
<n-button
|
|
|
|
<n-button
|
|
|
|
:style="noBorderInput"
|
|
|
|
:style="noBorderInput"
|
|
|
|
icon-placement="right"
|
|
|
|
icon-placement="right"
|
|
|
|
@click="index==0?()=>{}:removeCondition(index)"
|
|
|
|
|
|
|
|
style=" padding: 0;
|
|
|
|
style=" padding: 0;
|
|
|
|
margin-left: 17px;"
|
|
|
|
margin-left: 17px;"
|
|
|
|
|
|
|
|
@click="index == 0 ? () => {} : removeCondition(index)"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #icon>
|
|
|
|
<template #icon>
|
|
|
|
<!-- <SvgIcon size="24" name="close" color="#F00"/>
|
|
|
|
<!-- <SvgIcon size="24" name="close" color="#F00"/>
|
|
|
@ -482,7 +490,6 @@ if(formValue.name){
|
|
|
|
</n-button>
|
|
|
|
</n-button>
|
|
|
|
<template #feedback>
|
|
|
|
<template #feedback>
|
|
|
|
<div v-if="formValue.conditions[index].type == null || formValue.conditions[index].result == null || formValue.conditions[index].result == ''" style="color:#d03050">
|
|
|
|
<div v-if="formValue.conditions[index].type == null || formValue.conditions[index].result == null || formValue.conditions[index].result == ''" style="color:#d03050">
|
|
|
|
|
|
|
|
|
|
|
|
<SvgIcon size="16" name="notice" style="margin-top: -2px;margin-right: 5px;" />请选择过滤条件
|
|
|
|
<SvgIcon size="16" name="notice" style="margin-top: -2px;margin-right: 5px;" />请选择过滤条件
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -494,9 +501,8 @@ if(formValue.name){
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</n-form>
|
|
|
|
</n-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="bottomline"></div>
|
|
|
|
<div class="bottomline" />
|
|
|
|
<template #footer>
|
|
|
|
<template #footer>
|
|
|
|
<div class="wrapper-footer">
|
|
|
|
<div class="wrapper-footer">
|
|
|
|
<n-button style="background-color: #507afd;width: 72px;height: 38px;" type="info" @click="handleSumbit">
|
|
|
|
<n-button style="background-color: #507afd;width: 72px;height: 38px;" type="info" @click="handleSumbit">
|
|
|
|