This commit is contained in:
sjl
2025-02-17 16:28:59 +08:00
parent 942bae3045
commit 6e6cfa5be0
6 changed files with 76 additions and 65 deletions

View File

@@ -4,10 +4,10 @@
<div>
<el-transfer v-model="value"
filterable
:filter-method="filterMethod"
filter-placeholder="请输入内容搜索"
:data="allData"
:titles="['未绑定设备', '已绑定设备']">
:filter-method="filterMethod"
filter-placeholder="请输入内容搜索"
:data="allData"
:titles="['未绑定设备', '已绑定设备']">
<template #default="{ option }">
<el-tooltip :content="option.tips" placement="top" :show-after=1000>
<span>{{ option.label }}</span>
@@ -69,6 +69,8 @@ const filterMethod = (query: string, item: { label?: string }) => {
dialogVisible.value = true
planData.value = data
console.log('123')
const pqDevList_Result1 = await getUnboundPqDevList(data);
unboundPqDevList.value = pqDevList_Result1.data as Device.ReqPqDevParams[];
@@ -76,9 +78,11 @@ const filterMethod = (query: string, item: { label?: string }) => {
boundPqDevList.value = pqDevList_Result2.data as Device.ReqPqDevParams[];
value.value = boundPqDevList.value.map((i: { id: { toString: () => any } }) => i.id.toString());
console.log('123',value.value)
}
const close = () => {
dialogVisible.value = false
}
const save = async () => {

View File

@@ -214,12 +214,13 @@ const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
// 关闭弹窗
const close = () => {
value.value = []
dialogVisible.value = false
// 清空dialogForm中的值
resetFormContent()
// 重置表单
dialogFormRef.value?.resetFields()
}
@@ -278,7 +279,8 @@ const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
const open = async (sign: string,
data: Plan.ReqPlan,
currentMode: string,) => {
value.value = []
//处理异步调用
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== currentMode)?.id ?? ''
data.pattern = patternId

View File

@@ -16,6 +16,7 @@
<el-button type='danger' v-auth.plan="'delete'" :icon='Delete' plain :disabled='!scope.isSelected' @click='batchDelete(scope.selectedListIds)'>
删除
</el-button>
<el-button type='primary' v-auth.plan="'analysis'" link :icon='List' @click='statisticalAnalysisMore(scope.selectedListIds)'>统计分析</el-button>
</template>
<!-- 表格操作 -->
<template #operation='scope'>
@@ -394,6 +395,10 @@ const showDeviceOpen = (row: Partial<Plan.ReqPlan> = {}) => {
const myDict = new Map<string, any[]>();
const statisticalAnalysisMore = async (id: string[]) =>{
}
const statisticalAnalysis = async (row: Partial<Plan.ReqPlan> = {}) => {
useDownload(staticsAnalyse,row.name+'分析结果', {planId:row.id}, false,'.xlsx')