|
|
@ -1,15 +1,20 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="app-container"> |
|
|
<div class="app-container"> |
|
|
<el-form inline :model="queryParams"> |
|
|
<el-form inline :model="queryParams"> |
|
|
|
|
|
<el-form-item label="系统名称:"> |
|
|
|
|
|
<el-select v-model="queryParams.ssysId" clearable style="width: 200px"> |
|
|
|
|
|
<el-option v-for="item in dsSysList" :label="item.name" :value="item.id"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="模式名称:"> |
|
|
|
|
|
<el-input v-model="queryParams.mdlName"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
<el-form-item label="批量对象表名:"> |
|
|
<el-form-item label="批量对象表名:"> |
|
|
<el-input v-model="queryParams.bathObjTabName"></el-input> |
|
|
<el-input v-model="queryParams.bathObjTabName"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="批里对象字段名:"> |
|
|
<el-form-item label="批里对象字段名:"> |
|
|
<el-input v-model="queryParams.bathObjFldName"></el-input> |
|
|
<el-input v-model="queryParams.bathObjFldName"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="词性名称:"> |
|
|
|
|
|
<el-input v-model="queryParams.posName"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="状态:"> |
|
|
<el-form-item label="状态:"> |
|
|
<el-select v-model="queryParams.status" style="width: 200px" clearable> |
|
|
<el-select v-model="queryParams.status" style="width: 200px" clearable> |
|
|
<el-option label="正常" key="tsmcb-query-status-1" value="1"></el-option> |
|
|
<el-option label="正常" key="tsmcb-query-status-1" value="1"></el-option> |
|
|
@ -27,7 +32,7 @@ |
|
|
type="primary" |
|
|
type="primary" |
|
|
plain |
|
|
plain |
|
|
icon="Plus" |
|
|
icon="Plus" |
|
|
@click="handleAdd" |
|
|
@click="showDassetDialog" |
|
|
>新增</el-button> |
|
|
>新增</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
@ -57,12 +62,18 @@ |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-table :data="dataList" @selection-change="handleSelection"> |
|
|
<el-table :data="dataList" @selection-change="handleSelection"> |
|
|
<el-table-column type="selection" width="50" align="center" /> |
|
|
<el-table-column type="selection" width="50" align="center" /> |
|
|
<!-- <el-table-column label="序号" align="center" prop="onum"></el-table-column>--> |
|
|
<el-table-column label="系统名称" align="center"> |
|
|
|
|
|
<template #default="scope"> |
|
|
|
|
|
<span > |
|
|
|
|
|
{{ |
|
|
|
|
|
getSrcSysName(scope.row.ssysId) |
|
|
|
|
|
}} |
|
|
|
|
|
</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="模式名称" align="center" prop="mdlName"></el-table-column> |
|
|
<el-table-column label="批量对象表名" align="center" prop="bathObjTabName"></el-table-column> |
|
|
<el-table-column label="批量对象表名" align="center" prop="bathObjTabName"></el-table-column> |
|
|
<el-table-column label="批里对象字段名" align="center" prop="bathObjFldName"></el-table-column> |
|
|
<el-table-column label="批里对象字段名" align="center" prop="bathObjFldName"></el-table-column> |
|
|
<el-table-column label="频次" align="center" prop="freq"></el-table-column> |
|
|
|
|
|
<el-table-column label="词性" align="center" prop="pos"></el-table-column> |
|
|
|
|
|
<el-table-column label="词性名称" align="center" prop="posName"></el-table-column> |
|
|
|
|
|
<el-table-column label="状态" align="center" prop="status"> |
|
|
<el-table-column label="状态" align="center" prop="status"> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
<el-switch v-model="scope.row.status" |
|
|
<el-switch v-model="scope.row.status" |
|
|
@ -78,7 +89,6 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="操作" align="center" prop="operation"> |
|
|
<el-table-column label="操作" align="center" prop="operation"> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
<el-link type="primary" @click="handleEdit(scope.row)" :underline="false">修改</el-link> |
|
|
|
|
|
<el-link type="danger" style="margin-left: 10px" @click="handleDelete([scope.row.onum])" :underline="false">删除</el-link> |
|
|
<el-link type="danger" style="margin-left: 10px" @click="handleDelete([scope.row.onum])" :underline="false">删除</el-link> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
@ -90,57 +100,6 @@ |
|
|
v-model:limit="queryParams.pageSize" |
|
|
v-model:limit="queryParams.pageSize" |
|
|
@pagination="getList" |
|
|
@pagination="getList" |
|
|
/> |
|
|
/> |
|
|
<el-dialog |
|
|
|
|
|
v-model="showDialog" |
|
|
|
|
|
:title="currentForm.operate === 'ADD'?'新增词典配置表':'编辑词典配置表'" |
|
|
|
|
|
width="500" |
|
|
|
|
|
> |
|
|
|
|
|
<el-form v-if="showDialog" |
|
|
|
|
|
:model="currentForm" |
|
|
|
|
|
ref="formRef" |
|
|
|
|
|
:rules="rules" |
|
|
|
|
|
label-width="125px"> |
|
|
|
|
|
<el-form-item label="批量对象表名:" prop="bathObjTabName"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="currentForm.bathObjTabName" clearable |
|
|
|
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="批量对象字段名:" prop="bathObjFldName"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="currentForm.bathObjFldName" clearable |
|
|
|
|
|
/> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="频次:" prop="freq"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="currentForm.freq" clearable |
|
|
|
|
|
></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="词性:" prop="pos"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="currentForm.pos" clearable |
|
|
|
|
|
></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="词性名称:" prop="posName"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="currentForm.posName" clearable |
|
|
|
|
|
></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="状态:"> |
|
|
|
|
|
<el-radio-group v-model="currentForm.status"> |
|
|
|
|
|
<el-radio value="1" size="large">正常</el-radio> |
|
|
|
|
|
<el-radio value="0" size="large">停用</el-radio> |
|
|
|
|
|
</el-radio-group> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<template #footer> |
|
|
|
|
|
<div class="dialog-footer"> |
|
|
|
|
|
<el-button @click="showDialog = false">取消</el-button> |
|
|
|
|
|
<el-button type="primary" @click="handleSave"> |
|
|
|
|
|
确定 |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
<el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body> |
|
|
<el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body> |
|
|
<el-upload |
|
|
<el-upload |
|
|
ref="uploadRef" |
|
|
ref="uploadRef" |
|
|
@ -163,26 +122,6 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-upload> |
|
|
</el-upload> |
|
|
<!-- <el-form>--> |
|
|
|
|
|
<!-- <el-form-item>--> |
|
|
|
|
|
<!-- <template #label>--> |
|
|
|
|
|
<!-- 开启覆盖--> |
|
|
|
|
|
<!-- <el-tooltip--> |
|
|
|
|
|
<!-- class="box-item"--> |
|
|
|
|
|
<!-- effect="dark"--> |
|
|
|
|
|
<!-- placement="right"--> |
|
|
|
|
|
<!-- >--> |
|
|
|
|
|
<!-- <template #content>--> |
|
|
|
|
|
<!-- <div>打开“开启覆盖”则原补录信息会被模板中未填信息覆盖为空值。<br>--> |
|
|
|
|
|
<!-- 关闭“开启覆盖”则模板中留空数据不会影响原补录信息--> |
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
<!-- <el-link :underline="false" type="primary"><i class="ri-question-line"></i></el-link>--> |
|
|
|
|
|
<!-- </el-tooltip>--> |
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
<!-- <el-switch v-model="upload.overWrite"></el-switch>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- </el-form>--> |
|
|
|
|
|
<template #footer> |
|
|
<template #footer> |
|
|
<div class="dialog-footer"> |
|
|
<div class="dialog-footer"> |
|
|
<el-button type="primary" :disabled="upload.isUploading" @click="submitFileForm">确 定</el-button> |
|
|
<el-button type="primary" :disabled="upload.isUploading" @click="submitFileForm">确 定</el-button> |
|
|
@ -223,6 +162,75 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
<el-dialog title="选择资产" v-model="dasset.open" width="1100px" append-to-body> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="5"> |
|
|
|
|
|
<el-tree style="margin-top: 10px" ref="treeRef" node-key="id" :default-expand-all="true" |
|
|
|
|
|
:highlight-current="true" :expand-on-click-node="false" :data="treeData" :props="defaultProps" |
|
|
|
|
|
:filter-node-method="filterNode" :current-node-key="currentNode.id" @node-click="handleNodeClick"> |
|
|
|
|
|
</el-tree> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="19"> |
|
|
|
|
|
<el-form :model="queryDassetParams" ref="queryRef" :inline="true" label-width="68px"> |
|
|
|
|
|
<el-form-item label="名称" prop="name"> |
|
|
|
|
|
<el-input v-model="queryDassetParams.dataAstEngName" placeholder="请输入名称" clearable style="width: 160px" |
|
|
|
|
|
@keyup.enter="handleDassetQuery" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<el-button type="primary" icon="Search" @click="handleDassetQuery">搜索</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-table :data="dassetList" |
|
|
|
|
|
@selection-change="handleParentSelectionChange" |
|
|
|
|
|
ref="parentTable"> |
|
|
|
|
|
<el-table-column type="selection" width="40"></el-table-column> |
|
|
|
|
|
<el-table-column label="资产编号" align="center" prop="astNo"/> |
|
|
|
|
|
<el-table-column label="表来源系统" align="center" width="150" prop="dataAstSrc" > |
|
|
|
|
|
<template #default="scope"> |
|
|
|
|
|
<span >{{getSrcSysName(scope.row.dataAstSrc)}}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="模式名称" align="center" prop="mdlName"></el-table-column> |
|
|
|
|
|
<el-table-column label="表英文名称" align="center" width="200" prop="dataAstEngName"/> |
|
|
|
|
|
<el-table-column label="表中文名称" align="center" width="200" prop="dataAstCnName"/> |
|
|
|
|
|
<el-table-column label="操作"> |
|
|
|
|
|
<template #default="scope"> |
|
|
|
|
|
<el-button link type="primary" @click="showColumns(scope.row)">选择字段</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<pagination v-show="dassetTotal > 0" :total="dassetTotal" v-model:page="queryDassetParams.pageNum" |
|
|
|
|
|
v-model:limit="queryDassetParams.pageSize" @pagination="getDassetList" /> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<template #footer> |
|
|
|
|
|
<div class="dialog-footer"> |
|
|
|
|
|
<el-button type="primary" @click="save">确 定</el-button> |
|
|
|
|
|
<el-button @click="dasset.open = false">取 消</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
<el-dialog title="选择字段" v-model="openColumn" width="800px" append-to-body> |
|
|
|
|
|
<el-table :data="column.children" style="width: 100%" |
|
|
|
|
|
@selection-change="handleChildSelectionChange"> |
|
|
|
|
|
<el-table-column type="selection" width="55"></el-table-column> |
|
|
|
|
|
<el-table-column label="字段英文名" prop="fld_eng_name" width="200"></el-table-column> |
|
|
|
|
|
<el-table-column label="字段中文名" prop="fld_cn_name" width="200"></el-table-column> |
|
|
|
|
|
<el-table-column label="字段类型" width="170" align="center" prop="fld_type"></el-table-column> |
|
|
|
|
|
<el-table-column label="主键标志" align="center" prop="pk_flag"> |
|
|
|
|
|
<template #default="props"> |
|
|
|
|
|
<span v-if="props.row.pkFlag === 'Y'">是</span> |
|
|
|
|
|
<span v-else>否</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<template #footer> |
|
|
|
|
|
<div class="dialog-footer"> |
|
|
|
|
|
<el-button type="primary" @click="confirmColumns">确 定</el-button> |
|
|
|
|
|
<el-button @click="openColumn = false">取 消</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<script setup> |
|
|
<script setup> |
|
|
@ -230,36 +238,114 @@ import { ref, nextTick, computed, watch, reactive, onMounted } from 'vue' |
|
|
import { getCdplbList, saveCdplb, deleteCdplb } from "@/api/dataint/cdplb" |
|
|
import { getCdplbList, saveCdplb, deleteCdplb } from "@/api/dataint/cdplb" |
|
|
import {getToken} from "@/utils/auth.js"; |
|
|
import {getToken} from "@/utils/auth.js"; |
|
|
import * as XLSX from "xlsx"; |
|
|
import * as XLSX from "xlsx"; |
|
|
|
|
|
import {deptTreeSelect, getSearch, getSearchWithColumns} from "@/api/dataAsset/assetDetail.js"; |
|
|
|
|
|
import useUserStore from "@/store/modules/user.js"; |
|
|
const { proxy } = getCurrentInstance(); |
|
|
const { proxy } = getCurrentInstance(); |
|
|
|
|
|
const userStore = useUserStore(); // 正确调用 |
|
|
|
|
|
const dsSysList = userStore.dsSysList; // 访问属性 |
|
|
const queryParams = ref({ |
|
|
const queryParams = ref({ |
|
|
|
|
|
ssysId: null, |
|
|
|
|
|
mdlName:'', |
|
|
bathObjTabName:'', |
|
|
bathObjTabName:'', |
|
|
bathObjFldName:'', |
|
|
bathObjFldName:'', |
|
|
posName:'', |
|
|
|
|
|
status:'', |
|
|
status:'', |
|
|
pageNum:1, |
|
|
pageNum:1, |
|
|
pageSize:10 |
|
|
pageSize:10 |
|
|
}) |
|
|
}) |
|
|
const showDialog = ref(false) |
|
|
const selectedTables = ref([]) |
|
|
const rules = ref({ |
|
|
const selectedColumns = ref([]) |
|
|
bathObjTabName: [{required: true, message: '批量对象表名不能为空!', trigger: 'change',},], |
|
|
const parentTable = ref(null) |
|
|
bathObjFldName: [{required: true, message: '批里对象字段名不能为空!!', trigger: 'change',},], |
|
|
const queryDassetParams = ref({ |
|
|
pos: [{required: true, message: '词性不能为空!', trigger: 'change',},], |
|
|
pageNum: 1, |
|
|
posName: [{required: true, message: '词性名称不能为空!', trigger: 'change',},], |
|
|
pageSize: 10, |
|
|
freq: [{required: true, message: '频次不能为空!', trigger: 'change',},], |
|
|
dataAstEngName: undefined, |
|
|
}) |
|
|
name: undefined, |
|
|
const currentForm = ref({ |
|
|
dataAstType: 'TABLE', |
|
|
operate: 'ADD', |
|
|
dataAstScreen: '智能助手', |
|
|
bathObjTabName:'', |
|
|
dataAstSrc: undefined, |
|
|
bathObjFldName:'', |
|
|
|
|
|
pos:'', |
|
|
|
|
|
posName:'', |
|
|
|
|
|
freq:'', |
|
|
|
|
|
status:'1' |
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
const dassetList = ref([]) |
|
|
|
|
|
const dassetTotal = ref(0) |
|
|
const multSelection = ref([]) |
|
|
const multSelection = ref([]) |
|
|
const dataList = ref([]) |
|
|
const dataList = ref([]) |
|
|
const total = ref(0) |
|
|
const total = ref(0) |
|
|
|
|
|
const dasset = ref({ |
|
|
|
|
|
open: false, |
|
|
|
|
|
}) |
|
|
|
|
|
const openColumn = ref(false) |
|
|
|
|
|
const column = ref({}) |
|
|
|
|
|
const treeData = ref([]) |
|
|
|
|
|
const defaultProps = { |
|
|
|
|
|
children: 'children', |
|
|
|
|
|
label: 'label', |
|
|
|
|
|
}; |
|
|
|
|
|
const currentNode = ref({}) |
|
|
|
|
|
const filterNode = (value, data) => { |
|
|
|
|
|
if (!value) return true; |
|
|
|
|
|
return data.label.indexOf(value) !== -1; |
|
|
|
|
|
}; |
|
|
|
|
|
function showColumns(row){ |
|
|
|
|
|
column.value = row; |
|
|
|
|
|
openColumn.value = true; |
|
|
|
|
|
} |
|
|
|
|
|
function save(){ |
|
|
|
|
|
if (selectedTables.value.length>0){ |
|
|
|
|
|
let array = [] |
|
|
|
|
|
selectedTables.value.forEach(table=>{ |
|
|
|
|
|
if (table.children && table.children.length>0){ |
|
|
|
|
|
table.children.forEach(child=>{ |
|
|
|
|
|
array.push({ |
|
|
|
|
|
ssysId: parseInt(table.dataAstSrc), |
|
|
|
|
|
mdlName: child.mdl_name, |
|
|
|
|
|
bathObjTabName: table.dataAstEngName, |
|
|
|
|
|
bathObjFldName: child.fld_eng_name, |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
saveCdplb({list:array}).then(res=>{ |
|
|
|
|
|
proxy.$modal.msgSuccess("保存成功") |
|
|
|
|
|
dasset.value.open = false; |
|
|
|
|
|
selectedTables.value = [] |
|
|
|
|
|
handleQuery() |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
proxy.$modal.msgWarning("请至少选择一条数据") |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function confirmColumns(){ |
|
|
|
|
|
if (selectedColumns.value.length>0){ |
|
|
|
|
|
let array = [] |
|
|
|
|
|
selectedColumns.value.forEach(selectedCol=>{ |
|
|
|
|
|
array.push({ |
|
|
|
|
|
ssysId: parseInt(column.value.dataAstSrc), |
|
|
|
|
|
mdlName: selectedCol.mdl_name, |
|
|
|
|
|
bathObjTabName: column.value.dataAstEngName, |
|
|
|
|
|
bathObjFldName: selectedCol.fld_eng_name, |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
saveCdplb({list:array}).then(res=>{ |
|
|
|
|
|
proxy.$modal.msgSuccess("保存成功") |
|
|
|
|
|
openColumn.value = false; |
|
|
|
|
|
selectedColumns.value = []; |
|
|
|
|
|
handleQuery() |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
proxy.$modal.msgWarning("请至少选择一条数据") |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function handleChildSelectionChange(selection){ |
|
|
|
|
|
selectedColumns.value = selection |
|
|
|
|
|
} |
|
|
|
|
|
function handleParentSelectionChange(selection){ |
|
|
|
|
|
dassetList.value.forEach((parentRow) => { |
|
|
|
|
|
selectedTables.value = selectedTables.value.filter(item => item.astNo !== parentRow.astNo); |
|
|
|
|
|
}) |
|
|
|
|
|
selectedTables.value.push(...selection) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/*** 导入参数 */ |
|
|
/*** 导入参数 */ |
|
|
const upload = reactive({ |
|
|
const upload = reactive({ |
|
|
// 是否显示弹出层(导入) |
|
|
// 是否显示弹出层(导入) |
|
|
@ -315,53 +401,60 @@ function getList(){ |
|
|
} |
|
|
} |
|
|
function resetQuery(){ |
|
|
function resetQuery(){ |
|
|
queryParams.value = { |
|
|
queryParams.value = { |
|
|
pos:'', |
|
|
ssysId: null, |
|
|
type:'', |
|
|
mdlName:'', |
|
|
stdRplStr:'', |
|
|
bathObjTabName:'', |
|
|
|
|
|
bathObjFldName:'', |
|
|
status:'', |
|
|
status:'', |
|
|
pageNum:1, |
|
|
pageNum:1, |
|
|
pageSize:10 |
|
|
pageSize:10 |
|
|
} |
|
|
} |
|
|
handleQuery() |
|
|
handleQuery() |
|
|
} |
|
|
} |
|
|
function handleAdd(){ |
|
|
function handleNodeClick(data) { |
|
|
showDialog.value = true |
|
|
queryDassetParams.value.dataAstSrc = data.name; |
|
|
currentForm.value ={ |
|
|
handleDassetQuery(); |
|
|
operate: 'ADD', |
|
|
} |
|
|
bathObjTabName:'', |
|
|
const handleDassetQuery = () => { |
|
|
bathObjFldName:'', |
|
|
queryDassetParams.value.pageNum = 1 |
|
|
pos:'', |
|
|
getDassetList() |
|
|
posName:'', |
|
|
|
|
|
freq:'', |
|
|
|
|
|
status:'1' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
function handleSave(){ |
|
|
function getDassetList(){ |
|
|
proxy.$refs.formRef.validate(valid => { |
|
|
getSearchWithColumns(proxy.addDateRange(queryDassetParams.value)).then(res => { |
|
|
if (valid) { |
|
|
dassetList.value = res.data.rows; |
|
|
saveCdplb(currentForm.value).then(res=>{ |
|
|
if (dassetList.value && dassetList.value.length>0){ |
|
|
proxy.$modal.msgSuccess("操作成功"); |
|
|
dassetList.value.forEach(dasset=>{ |
|
|
showDialog.value = false |
|
|
if (dasset.children && dasset.children.length>0){ |
|
|
getList() |
|
|
dasset.mdlName = dasset.children[0].mdl_name |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
dassetTotal.value = res.data.total; |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
function handleEdit(row){ |
|
|
const getSrcSysName = (id) => { |
|
|
currentForm.value = JSON.parse(JSON.stringify(row)) |
|
|
if (id === null || id === undefined) return ''; |
|
|
currentForm.value.operate = 'UPDATE' |
|
|
const getName = (val) => { |
|
|
showDialog.value = true |
|
|
const match = dsSysList.find(item => item.id === parseInt(val)); |
|
|
} |
|
|
return match ? match.name : val; |
|
|
|
|
|
}; |
|
|
|
|
|
return getName(id); |
|
|
|
|
|
}; |
|
|
function changeStatus(row){ |
|
|
function changeStatus(row){ |
|
|
let param = { |
|
|
let param = { |
|
|
onum: row.onum, |
|
|
onum: row.onum, |
|
|
status: row.status |
|
|
status: row.status |
|
|
} |
|
|
} |
|
|
saveCdplb(param).then(res=>{ |
|
|
saveCdplb({list:[param]}).then(res=>{ |
|
|
proxy.$modal.msgSuccess("操作成功"); |
|
|
proxy.$modal.msgSuccess("操作成功"); |
|
|
getList() |
|
|
getList() |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
function showDassetDialog(){ |
|
|
|
|
|
dasset.value.open = true |
|
|
|
|
|
getDeptTree(); |
|
|
|
|
|
handleDassetQuery(); |
|
|
|
|
|
} |
|
|
function multDelete(){ |
|
|
function multDelete(){ |
|
|
let array = [] |
|
|
let array = [] |
|
|
if (multSelection.value.length>0){ |
|
|
if (multSelection.value.length>0){ |
|
|
@ -389,11 +482,10 @@ function handleExport(){ |
|
|
if (dataList.value.length > 0){ |
|
|
if (dataList.value.length > 0){ |
|
|
for (let i = 0; i < dataList.value.length; i++) { |
|
|
for (let i = 0; i < dataList.value.length; i++) { |
|
|
data.push({ |
|
|
data.push({ |
|
|
|
|
|
"系统":getSrcSysName(dassetList.value[i].ssysId), |
|
|
|
|
|
"模式":dassetList.value[i].mdlName, |
|
|
"批量对象表名":dataList.value[i].bathObjTabName, |
|
|
"批量对象表名":dataList.value[i].bathObjTabName, |
|
|
"批里对象字段名":dataList.value[i].bathObjFldName, |
|
|
"批里对象字段名":dataList.value[i].bathObjFldName, |
|
|
"频次":dataList.value[i].freq, |
|
|
|
|
|
"词性":dataList.value[i].pos, |
|
|
|
|
|
"词性名称":dataList.value[i].posName, |
|
|
|
|
|
"状态":dataList.value[i].status === '1'?"正常":"停用" |
|
|
"状态":dataList.value[i].status === '1'?"正常":"停用" |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
@ -406,10 +498,25 @@ function handleExport(){ |
|
|
function handleSelection(val){ |
|
|
function handleSelection(val){ |
|
|
multSelection.value= val |
|
|
multSelection.value= val |
|
|
} |
|
|
} |
|
|
|
|
|
function getDeptTree() { |
|
|
|
|
|
deptTreeSelect().then(response => { |
|
|
|
|
|
const data = response.data || []; |
|
|
|
|
|
addLabel(data); |
|
|
|
|
|
treeData.value = data; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
function addLabel(nodes) { |
|
|
|
|
|
if (!nodes) return; |
|
|
|
|
|
nodes.forEach(node => { |
|
|
|
|
|
node.label = getSrcSysName(node.name); // 给每个节点加 label |
|
|
|
|
|
if (node.children && node.children.length > 0) { |
|
|
|
|
|
addLabel(node.children); // 递归处理子节点 |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
handleQuery() |
|
|
handleQuery() |
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |