Merge branch 'main' into shen

pull/1/head
Dragon 1 year ago
commit fd41813169

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>搜索</title>
<defs>
<rect id="path-1" x="0" y="0" width="64" height="64"></rect>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-1456.000000, -2179.000000)">
<g id="搜索" transform="translate(1456.000000, 2179.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<g mask="url(#mask-2)">
<g transform="translate(7.000000, 7.000000)">
<rect id="矩形" fill="none" x="0" y="0" width="50" height="50"></rect>
<path fill="#999999" d="M22.381822,0.00665233369 C34.7429609,0.00665233369 44.7636439,10.0273353 44.7636439,22.3884743 C44.7636439,27.650919 42.9474783,32.4891755 39.9077466,36.3106444 L49.7142957,46.1174007 C50.10482,46.507925 50.10482,47.1410899 49.7142957,47.5316142 L47.5316142,49.7142957 C47.1410899,50.10482 46.507925,50.10482 46.1174007,49.7142957 L36.3119993,39.9080267 C32.4892827,42.9515923 27.6479429,44.7702962 22.381822,44.7702962 C10.020683,44.7702962 0,34.7496132 0,22.3884743 C0,10.0273353 10.020683,0.00665233369 22.381822,0.00665233369 Z M22.381822,5.09343005 C12.8300328,5.09343005 5.08677772,12.8366851 5.08677772,22.3884743 C5.08677772,31.9402635 12.8300328,39.6835185 22.381822,39.6835185 C31.9336111,39.6835185 39.6768662,31.9402635 39.6768662,22.3884743 C39.6768662,12.8366851 31.9336111,5.09343005 22.381822,5.09343005 Z" id="矩形-2" fill-rule="evenodd"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -45,7 +45,7 @@ export const asideMap: Recordable<AsideEntity> = {
izsimilarity: { izsimilarity: {
label: '相似度阈值', label: '相似度阈值',
defaultValue: [0, 100], defaultValue: [0, 100],
isDefaultFilter: false, isDefaultFilter: true,
key: 'izsimilarity', key: 'izsimilarity',
component: SimilarityVue, component: SimilarityVue,
}, },

@ -1,4 +1,8 @@
export const timeOptions = [ export const timeOptions = [
{
label: '全部',
value: '',
},
{ {
label: '近3个月', label: '近3个月',
value: '3', value: '3',

@ -272,10 +272,10 @@ const moveEnd = () => {
/> />
<div v-html="item.name" /> <div v-html="item.name" />
</li> </li>
<!-- filter=".draggable-li[draggable='false']" -->
<VueDraggable <VueDraggable
@end="moveEnd" @end="moveEnd"
v-model="unData" v-model="unData"
filter=".draggable-li[draggable='false']"
class="draggable-ul" class="draggable-ul"
:animation="150" :animation="150"
group="shared" group="shared"

@ -109,6 +109,7 @@ function selectHandler(item: SearchEntity) {
&:hover { &:hover {
background-color: #f3f8ff; background-color: #f3f8ff;
cursor: pointer;
} }
} }
} }

@ -17,6 +17,21 @@ const selectIds = ref<string[]>([])
function showModal() { function showModal() {
show.value = true show.value = true
//
const config = configStore.getConfig
const customConfig = configStore.getCustomConfig
if (config == null || customConfig == null)
return
const { showList, hideList } = generatList(config, customConfig)
onList.value = showList
offList.value = hideList
//
checkAll.value = hideList.every(item => item.checked);
//
offKeyword.value = ''
onKeyword.value = ''
} }
function closeModal() { function closeModal() {
@ -29,7 +44,7 @@ const offList = ref<any[]>([])
const onList = ref<any[]>([]) const onList = ref<any[]>([])
const allCount = computed(() => { const allCount = computed(() => {
return `全部筛选(共${offList.value.length - 1}个)` return `全部筛选(共${offList.value.length}个)`
}) })
const selectCount = computed(() => { const selectCount = computed(() => {
@ -83,8 +98,9 @@ function generatList(config, customConfig) {
fix: isDefaultFilter, fix: isDefaultFilter,
checked: isChecked, checked: isChecked,
}) })
if (isChecked && selectIds.value.indexOf(key) === -1) {
isChecked && selectIds.value.push(key) isChecked && selectIds.value.push(key)
}
} }
} }
@ -125,8 +141,7 @@ configStore.$subscribe(() => {
async function handleSumbit(e: MouseEvent) { async function handleSumbit(e: MouseEvent) {
e.preventDefault() e.preventDefault()
const param = onList.value.map((item) => {
const param = onList.value.filter(item => !asideMap[item.id].isDefaultFilter).map((item) => {
return item.id return item.id
}).join(',') }).join(',')
@ -156,7 +171,9 @@ function onCheckChange(checked: any, item: any) {
if (index === -1 && checked) if (index === -1 && checked)
selectIds.value.push(item.id) selectIds.value.push(item.id)
else else
selectIds.value.splice(index, 1) index !== -1 && selectIds.value.splice(index, 1)
checkAll.value = offList.value.every(item => item.checked);
} }
const showIds = computed(() => { const showIds = computed(() => {
@ -180,11 +197,13 @@ watch(
if (action === 'add') { if (action === 'add') {
for (const item of offList.value) { for (const item of offList.value) {
if (!item.fix && diff.includes(item.id)) { if (!item.fix && diff.includes(item.id)) {
onList.value.push({ if (item.checked) {
id: item.id, onList.value.push({
name: item.name || '未配置', id: item.id,
fix: item.fix || false, name: item.name || '未配置',
}) fix: item.fix || false,
})
}
} }
} }
} }
@ -248,15 +267,21 @@ const rightInputHandler = debounce((keyword) => {
onKeyword.value = keyword onKeyword.value = keyword
}, 300) }, 300)
async function getfield(){ async function getfield() {
let res; let res;
res = await getAllfieldList(3) res = await getAllfieldList(3)
const userStore = useUser(); const userStore = useUser();
const userInfo = userStore.getUserInfo; const userInfo = userStore.getUserInfo;
res = await getfieldList(3,userInfo.id) res = await getfieldList(3, userInfo.id)
}
function onMove(e) {
// e
if (e?.related?.className?.indexOf('fix') !== -1) {
return false;
}
} }
onMounted(()=>{ onMounted(() => {
getfield(); getfield();
}) })
@ -280,9 +305,9 @@ onMounted(()=>{
:bordered="false" :bordered="false"
> >
<div> <div>
<n-input placeholder="搜索关键" @input="leftInputHandler"> <n-input placeholder="搜索关键" @input="leftInputHandler">
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1" /> <SvgIcon size="14px" name="magnifying-1-color999" />
</template> </template>
</n-input> </n-input>
<n-scrollbar style="max-height: 500px;border: 1px solid #cad2dd;border-radius: 2px;"> <n-scrollbar style="max-height: 500px;border: 1px solid #cad2dd;border-radius: 2px;">
@ -316,23 +341,18 @@ onMounted(()=>{
<span class="textbtnStyle" @click="clearDragSource"></span> <span class="textbtnStyle" @click="clearDragSource"></span>
</template> </template>
<div> <div>
<n-input placeholder="搜索关键" @input="rightInputHandler"> <n-input placeholder="搜索关键" @input="rightInputHandler">
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1" /> <SvgIcon size="14px" name="magnifying-1-color999" />
</template> </template>
</n-input> </n-input>
<n-scrollbar style="max-height: 500px;border: 1px solid #cad2dd;border-radius: 2px;" class="scroll"> <n-scrollbar style="max-height: 500px;border: 1px solid #cad2dd;border-radius: 2px;" class="scroll">
<VueDraggable v-model="onList" filter=".draggable-li[draggable='false']" class="draggable-ul" :animation="150" group="shared"> <VueDraggable v-model="onList" class="draggable-ul" :animation="150" group="shared" >
<div <div v-for="item in onList" v-show="item.name.includes(onKeyword)" :key="item.id" :draggable="true" class="cursor-move draggable-li">
v-for="item in onList" v-show="item.name.includes(onKeyword)" :key="item.id" :draggable="!item.fix" :class="{ fix: item.fix }" <SvgIcon name="drag" size="24" />
class="cursor-move draggable-li"
>
<SvgIcon v-show="!item.fix" name="drag" size="24" />
<span class="ml-2">{{ item.name }}</span> <span class="ml-2">{{ item.name }}</span>
<SvgIcon <SvgIcon size="16px" style="display:block;margin-left: auto;cursor: pointer;"
v-if="!item.fix" size="16px" style="display:block;margin-left: auto;cursor: pointer;" name="clear" @click="removeHandler(item.id)" />
name="clear" @click="removeHandler(item.id)"
/>
</div> </div>
</VueDraggable> </VueDraggable>
</n-scrollbar> </n-scrollbar>
@ -366,9 +386,10 @@ onMounted(()=>{
} }
&-bar { &-bar {
background-color: #e8e8e8; background-color: #f8f8f8;
width: 100%; width: calc(100% + 12px);
margin-top: 20px; margin-top: 20px;
color: #333333;
} }
&-footer { &-footer {
@ -422,6 +443,10 @@ onMounted(()=>{
align-items: center; align-items: center;
} }
.fix {
cursor: default !important;
}
.disable-check { .disable-check {
color: gainsboro; color: gainsboro;
} }

@ -20,7 +20,7 @@ const show = ref(false);
const cardStyle = { const cardStyle = {
width: "800px", width: "800px",
height: "800px", height: "830px",
"--n-padding-bottom": "10px", "--n-padding-bottom": "10px",
"--n-padding-left": "10px", "--n-padding-left": "10px",
}; };
@ -63,6 +63,7 @@ const columns: DataTableColumns<RowData> = [
{ {
title: "创建时间", title: "创建时间",
key: "createtime", key: "createtime",
width: 180
}, },
{ {
title: "更新者", title: "更新者",
@ -71,6 +72,7 @@ const columns: DataTableColumns<RowData> = [
{ {
title: "更新时间", title: "更新时间",
key: "updatetime", key: "updatetime",
width: 180
}, },
]; ];
@ -317,6 +319,7 @@ const inputHandler = debounce((word) => {
<div class="wrapper-table"> <div class="wrapper-table">
<NDataTable <NDataTable
ref="tableRef" ref="tableRef"
:max-height="480"
remote remote
:row-props="rowProps as any" :row-props="rowProps as any"
:columns="columns" :columns="columns"

@ -97,7 +97,7 @@ onUpdated(() => {
layout() layout()
}) })
const timeRange = ref('99') const timeRange = ref('')
const timeLabel = computed(() => { const timeLabel = computed(() => {
const item = timeOptions.find((option) => { const item = timeOptions.find((option) => {
return option.value === timeRange.value return option.value === timeRange.value
@ -333,14 +333,15 @@ function previewHandler(index: number,event: MouseEvent) {
</n-popselect> </n-popselect>
<n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click"> <n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click">
<div class="dropdown"> <div class="dropdown">
<span>{{ viewLabel || '请选择' }}</span> <!-- <span>{{ viewLabel || '请选择' }}</span> -->
<span>视图</span>
<SvgIcon class="gap" name="arrow-botton" size="14" /> <SvgIcon class="gap" name="arrow-botton" size="14" />
</div> </div>
</n-popselect> </n-popselect>
<div style="margin-left: 15px;cursor: pointer;color:#323233" @click="sortHandler()"> <!-- <div style="margin-left: 15px;cursor: pointer;color:#323233" @click="sortHandler()">
<span>相似度排序</span> <span>相似度排序</span>
<SvgIcon style="margin-left: 8px;" name="sort" size="12" /> <SvgIcon style="margin-left: 8px;" name="sort" size="12" />
</div> </div> -->
</div> </div>
<span style="font-size: 16px;color:#494949"> <span style="color:#7899fd;font-weight: 500;">{{ totalCount }}</span> </span> <span style="font-size: 16px;color:#494949"> <span style="color:#7899fd;font-weight: 500;">{{ totalCount }}</span> </span>
</div> </div>

Loading…
Cancel
Save