3330d91f by lxs

Merge branch 'release-test' of http://117.78.60.236:8000/csbr-daop/fe-data-asset…

…-management into release-test
2 parents 159c2c29 fe07f663
......@@ -342,3 +342,14 @@ export const getMetaStandardDetail = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/detail?guid=${guid}`,
method: 'get'
})
/** 元数据标准-标准数据 */
export const getMetaStandardDataList = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/page-list`,
method: 'post',
data: params
})
/** 元数据标准-标准字段 */
export const getMetaStandardDataFields = (metaStandardGuid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/get-standard-field?metaStandardGuid=${metaStandardGuid}`,
method: 'get'
})
\ No newline at end of file
......
......@@ -58,7 +58,7 @@ watch(
const changeTab = (pane: any, ev: any) => {
const tabIndex = Number(pane.index);
const paneData: any = tabbarList.value[tabIndex];
if (paneData.name == 'budgetDataIndex' || paneData.name == 'iframePage') {
if (paneData.name == 'budgetDataIndex' || paneData.name == 'iframePage' || paneData.name == 'portraitMap' || paneData.name == 'portraitMaps') {
router.push(paneData.fullPath);
} else {
router.push({
......
......@@ -176,6 +176,19 @@ const routes: RouteRecordRaw[] = [
reuse: true,
activeMenu: '/data-meta/reports/iframePage',
},
},
{
path: 'portraitMaps',
name: 'portraitMaps',
component: () => import('@/views/data_meta/portraitMap.vue'),
meta: {
title: '全景地图',
sidebar: true,
breadcrumb: false,
cache: true,
reuse: true,
activeMenu: '/data-meta/reports/portraitMaps',
},
}
]
},
......
......@@ -174,7 +174,7 @@ const useMenuStore = defineStore(
else {
// 如果是 string 类型,则认为是路由,需要查找对应的主导航索引
const findIndex = allMenus.value.findIndex(item => item.children.some(r => {
if ((data== "/data-meta/reports/iframePage" || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) {
if ((data== "/data-meta/reports/iframePage" || data == '/data-meta/reports/portraitMaps' || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) {
return true;
}
if (data== "/data-meta/portraitMap" && r.path?.includes('/data-meta/portraitMap')) {
......
......@@ -157,7 +157,7 @@ const useRouteStore = defineStore(
};
}
r = routes.find((route: any) => {
return route.path === path || route.path === m.path || `/${route.path}` === m.path || ((path.includes('budgetDataIndex') && path.includes('/data-meta/report') && route.path.includes('/data-meta/report')) || (path.includes('iframePage') && path.includes('/data-meta/report')) || (path.includes('/data-meta/portraitMap') && route.path.includes('/data-meta/portraitMap')));
return route.path === path || route.path === m.path || `/${route.path}` === m.path || ((path.includes('budgetDataIndex') && path.includes('/data-meta/report') && route.path.includes('/data-meta/report')) || (path.includes('iframePage') && path.includes('/data-meta/report')) || (path.includes('portraitMaps') && path.includes('/data-meta/report')) || (path.includes('/data-meta/portraitMap') && route.path.includes('/data-meta/portraitMap')));
});
if (r && (path.includes('budgetDataIndex') || path.includes('iframePage')) || path.includes('portraitMap')) {
r.path = path;
......
......@@ -28,6 +28,7 @@ import {
const emits = defineEmits(["exportData"])
const { proxy } = getCurrentInstance() as any;
const tableEl = ref()
const cacheStore = useCatchStore()
const standardGuid = ref("")
const standardName = ref('')
......@@ -154,22 +155,32 @@ const tableSelectionChange = (val, tId) => {
};
const tablePageChange = (info) => {
const toChange = checkSave()
const changeCont = () => {
console.log('info', info)
page.value.curr = Number(info.curr);
page.value.limit = Number(info.limit);
toSearch({});
// page.value.curr = Number(info.curr);
// if (page.value.limit != Number(info.limit)) {
// page.value.limit = Number(info.limit);
// chunkData()
// } else {
// tableData.value = tableChunkData.value[page.value.curr - 1]
// tableInfo.value.data = tableData.value
// tableInfo.value.page.limit = page.value.limit
// tableInfo.value.page.curr = page.value.curr
// }
page.value.curr = Number(info.curr)
page.value.limit = Number(info.limit)
toSearch({})
}
if (!toChange) {
ElMessageBox.confirm(
'存在未保存的数据,切换后会丢失,是否确定切换',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
).then(() => {
changeCont()
})
} else {
changeCont()
}
};
const saveDisabled = ref(true)
const toolBtnClick = (btn) => {
const type = btn.value
if (type == 'export') {
......@@ -188,15 +199,9 @@ const toolBtnClick = (btn) => {
} else if (type == 'submit') {
saveData()
} else if (type == 'add_row') {
const params = {
guid: standardGuid.value
}
getDictionaryRuleData(params).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data ?? {}
let rowInfo: any = {}
tableFields.value.map(item => {
rowInfo[item.field] = data[item.field] ?? ''
rowInfo[item.field] = ''
})
rowInfo.guid = undefined;
rowInfo.STATE = 'Running'
......@@ -205,16 +210,14 @@ const toolBtnClick = (btn) => {
tableData.value.unshift(rowInfo)
orginData.value.unshift(rowInfo)
tableInfo.value.page.rows = tableData.value.length
// orginData.value.unshift(rowInfo)
// page.value.curr = 1
// chunkData()
} else {
ElMessage({
type: 'error',
message: res.msg
})
}
})
saveDisabled.value = false
// 表格滚动到第一行
let $tableEl = tableEl.value.tableRef
$tableEl.setCurrentRow(rowInfo)
let table = $tableEl.layout.table.refs
let tableScrollEle =
table.bodyWrapper.firstElementChild.firstElementChild
tableScrollEle.scrollTop = 0
}
}
......@@ -226,6 +229,7 @@ const tableBtnClick = (scope, btn) => {
row.STATE = 'Running'
row.STATUS = 'edit'
tableData.value[scope.$index] = row
saveDisabled.value = false
} else if (type == 'save') {
saveData(scope)
} else if (type == 'cancel') {
......@@ -245,6 +249,7 @@ const tableBtnClick = (scope, btn) => {
// chunkData()
}
tableInfo.value.page.rows = tableData.value.length
saveDisabled.value = true
} else if (type == 'remove') {
open("是否确定删除所选数据?", "warning");
}
......@@ -378,6 +383,7 @@ const saveData = async (scope: any = null, checkParamData: any = null) => {
return obj
})
loading.value = true
tableInfo.value.loading = true
saveStandardCodeFieldsData(params).then((res: any) => {
if (res.code == proxy.$passCode) {
getFirstPageData();
......@@ -390,6 +396,7 @@ const saveData = async (scope: any = null, checkParamData: any = null) => {
type: 'error',
message: res.msg,
})
tableInfo.value.loading = false
}
}).finally(() => loading.value = false)
}
......@@ -578,7 +585,7 @@ defineExpose({
<div class="table_tool_wrap">
<div class="tools_btns">
<el-button type="primary" @click="toolBtnClick({ value: 'add_row' })" v-preReClick :disabled="loading">新增行</el-button>
<el-button type="primary" plain @click="toolBtnClick({ value: 'submit' })" v-preReClick :disabled="loading">保存数据</el-button>
<el-button type="primary" plain @click="toolBtnClick({ value: 'submit' })" v-preReClick :disabled="saveDisabled || loading">保存数据</el-button>
<el-button @click="batching('delete')" v-preReClick :disabled="loading">批量删除</el-button>
<el-button @click="toolBtnClick({ value: 'import' })" v-preReClick :disabled="loading">导入数据</el-button>
<el-button @click="toolBtnClick({ value: 'export' })" v-preReClick :disabled="loading">导出数据</el-button>
......@@ -588,8 +595,13 @@ defineExpose({
@change="val => toSearch({})" /> -->
</div>
<div class="table_panel_wrap full">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tableSelectionChange="tableSelectionChange"
@tablePageChange="tablePageChange" />
<Table
ref="tableEl"
:tableInfo="tableInfo"
@tableBtnClick="tableBtnClick"
@tableSelectionChange="tableSelectionChange"
@tablePageChange="tablePageChange"
/>
</div>
</div>
......
......@@ -51,7 +51,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="自定义字段选择" v-if="form.fieldRQVOS.length">
<el-form-item label="自定义字段选择" v-if="form.fieldRQVOS && form.fieldRQVOS.length">
<div class="table-form">
<div class="table-form-wrapper" v-for="item,index in form.fieldRQVOS" :key="index">
<div class="table-form-item">
......@@ -112,10 +112,6 @@ const { proxy } = getCurrentInstance() as any;
const props = defineProps({
modelValue: Boolean,
title: {
type: String,
default: '新建'
},
standardOptions: {
type: Array,
default: () => ([])
......@@ -138,6 +134,9 @@ const visible = computed({
emit('update:modelValue', val);
}
})
const title = computed(() => {
return props.type === 'add' ? '新建元标准' : '编辑元标准'
})
/**
* 配置项列表
......@@ -215,10 +214,11 @@ function inputTypeChange (val, item) {
}
function getDetail () {
console.log('testsetse')
getMetaStandardDetail(props.guid).then((res:any) => {
if (res.code === proxy.$passCode) {
const data = res.data
data.fieldRQVOS = data.fieldRSVOS
form.value = { ...data }
}
})
}
......@@ -228,9 +228,11 @@ function confirm () {
if (!valid) return
let body = { ...form.value }
console.log(body)
delete body.fieldRSVOS
// return
const request = props.type === 'add' ? saveMetaStandard : updateMetaStandard
confirmLoading.value = true
saveMetaStandard(body).then((res:any) => {
request(body).then((res:any) => {
if (res.code === proxy.$passCode) {
ElMessage.success('操作成功')
emit('success')
......
......@@ -15,7 +15,8 @@ import { download } from '@/utils/common'
import { getParamsList } from '@/api/modules/dataAsset'
import { getStandardCodeList, saveStandardCode,
updateStandardCode, getStandardCodeDetail,
deleteStandardCode, getStandardCodeStandard, exportStandardCodeData
deleteStandardCode, getStandardCodeStandard, exportStandardCodeData,
getStandardCodeDataList
} from '@/api/modules/dataMetaService'
import {
addDictionary,
......@@ -165,7 +166,7 @@ const formItems: any = ref([
placeholder: '请输入',
field: 'codeName',
default: '',
maxlength: 20,
maxlength: 30,
clearable: true,
required: true
},
......@@ -185,7 +186,7 @@ const formItems: any = ref([
placeholder: '请输入',
field: 'standardName',
default: '',
maxlength: 20,
maxlength: 30,
clearable: true,
required: true
},
......@@ -634,9 +635,10 @@ const getTableData = (params) => {
if (res.code === proxy.$passCode) {
let data = res.data
let list = res.data.records || []
list = list.map(item => {
list = list.map((item,index) => {
item.label = item.codeName
item.value = item.guid
item.index = index
return item
})
tableInfo.value.data = list
......@@ -651,6 +653,7 @@ const getTableData = (params) => {
};
const tableSelectionChange = (val, tId) => {
val.sort((pre, cur) => pre.index - cur.index)
if (drawerInfo.value.visible) {
if (formItems.value.length == 2) {
uploadSelectRowData.value = val
......@@ -774,7 +777,7 @@ const toolBtnClick = (btn, data) => {
if (drawerInfo.value.type == 'edit') {
const editRows = formTableSelectRowData.value.filter(item => item.guid !== undefined)
if (editRows.length) {
formTable.value.tableInfo.loading = true
// formTable.value.tableInfo.loading = true
checkDelete().then((res: any) => {
if (res) {
ElMessageBox.confirm("数据字典有数据, 确定是否继续删除?", "提示", {
......@@ -787,7 +790,7 @@ const toolBtnClick = (btn, data) => {
} else {
removeRows()
}
formTable.value.tableInfo.loading = false
// formTable.value.tableInfo.loading = false
}).catch(xhr => {
ElMessage({
type: 'error',
......@@ -883,6 +886,9 @@ const tableBtnClick = (scope, btn) => {
let data = res.data
currTableData.value = data;
setDetailInfo(type)
checkDelete().then((res:any) => {
formItems.value.find(v => v.field === 'typeCode')['disabled'] = res ? true : false
})
} else {
ElMessage({
type: "error",
......@@ -895,10 +901,31 @@ const tableBtnClick = (scope, btn) => {
formTable.value.tableInfo.loading = false
drawerInfo.value.loading = false;
})
// 代码有数据后不允许编辑代码类型
} else if (type === 'remove') {
let removeRows = () => {
const existIndex = formTableData.value.findIndex(s => s.ROWID == row.ROWID)
existIndex > -1 && formTableData.value.splice(existIndex, 1)
}
if (drawerInfo.value.type == 'edit') {
checkDelete().then((res:any) => {
if (res) {
ElMessageBox.confirm("标准代码有数据, 确定是否继续删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: 'warning',
}).then(() => {
removeRows()
})
} else {
removeRows()
}
})
} else {
removeRows()
}
}
else if (type == "delete") {
currTableData.value = row;
tableInfo.value.loading = true
......@@ -917,41 +944,19 @@ const tableBtnClick = (scope, btn) => {
}
const checkDelete = (isBatch: any = false) => {
if (drawerInfo.value.visible) {
return new Promise((resolve, reject) => {
let params: any = {
guid: currTableData.value.guid
}
checkDeleteDictionaryScheme(params).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data
resolve(data)
} else {
reject(res.msg)
}
}).catch((xhr: any) => {
reject(xhr.msg)
})
})
} else {
return new Promise((resolve, reject) => {
let guids = [currTableData.value.guid]
if (isBatch) {
guids = selectRowData.value
pageIndex: 1,
pageSize: -1,
standardGuid: currTableData.value.guid
}
checkDeleteDictionary(guids).then((res: any) => {
getStandardCodeDataList(params).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data ?? {}
if (data.used) {
resolve({
used: true,
data: data.used
})
if (res.data.records.length) {
resolve(res.data)
} else {
resolve({
used: false,
data: data.unuse
})
resolve(null)
}
} else {
reject(res.msg)
......@@ -960,7 +965,6 @@ const checkDelete = (isBatch: any = false) => {
reject(xhr.msg)
})
})
}
}
const open = (msg, type, isBatch = false) => {
......@@ -1120,11 +1124,16 @@ const loadDrawer = async () => {
item.default = 'Y'
} else if (item.field === 'typeCode') {
item.default = '1'
} else {
} else if (item.field === 'hierarchy') {
item.default = ''
item.visible = false
}
else {
item.default = ''
}
item.disabled = false
})
formInfo.value.formInfo.items = formItems.value
formTableData.value = JSON.parse(JSON.stringify(orginData))
formTable.value.tableInfo.data = formTableData.value
......@@ -1374,11 +1383,7 @@ const scrollTable = (rowInfo) => {
const drawerBtnClick = (btn, info) => {
console.log('btn', btn, info)
console.log('table', formTable.value)
let uniqFieldNameList = Array.from(new Set(formTable.value.tableInfo.data.map(item => item.fieldName)))
if (uniqFieldNameList.length !== formTable.value.tableInfo.data.length) {
ElMessage.error('表结构字段名称需唯一,不允许重名')
return
}
let params = {
standardCodeFields: formTable.value.tableInfo.data.map(item => {
let obj = {
......@@ -1397,6 +1402,22 @@ const drawerBtnClick = (btn, info) => {
params.guid = currTableData.value.guid
}
if (btn.value == 'submit' || btn.value == 'saveAndAdd') {
let uniqFieldNameList = Array.from(new Set(formTable.value.tableInfo.data.map(item => item.fieldName)))
if (uniqFieldNameList.length !== formTable.value.tableInfo.data.length) {
ElMessage.error('表结构字段名称需唯一,不允许重名')
return
}
let standardCodeFields = params.standardCodeFields.map(v => v.fieldName).join()
let codeFieldName = params.codeFieldName
let codeFields = params.codeFields
let fieldValidate = false
if (standardCodeFields.includes(codeFieldName) && codeFields.every(v => standardCodeFields.includes(v))) {
fieldValidate = true
}
if (!fieldValidate) {
ElMessage.error('所选的编码字段和编码名称必须在字段名称中有')
return
}
drawerInfo.value.footer.btns.map((item: any) => item.disabled = true)
saveData(params,btn.value)
} else {
......@@ -1434,6 +1455,7 @@ onBeforeMount(() => {
getStandardCodeList(params).then((res:any) => {
if (res.code === proxy.$passCode) {
let data = res.data
data.records && data.records.forEach((item,index) => item.index = index)
tableInfo.value.data = data.records
tableInfo.value.page.limit = data.pageSize
tableInfo.value.page.curr = data.pageIndex
......@@ -1469,7 +1491,7 @@ onMounted(() => {
<el-button @click="batching('delete')" v-preReClick>批量删除</el-button>
<el-button @click="batching('export')" v-preReClick>批量导入</el-button>
</div>
<el-input class="table_search_input" v-model.trim="tableSearchInput" placeholder="请输入代码名称搜索"
<el-input class="table_search_input" v-model.trim="tableSearchInput" placeholder="请输入关键字搜索"
:suffix-icon="Search" clearable @change="val => getFirstPageData()" />
</div>
<div class="table_panel_wrap full">
......
......@@ -120,7 +120,7 @@ const uploadInfo = ref({
const dialogInfo: any = ref({
visible: false,
size: 700,
size: 560,
direction: "column",
header: {
title: "新建",
......@@ -265,7 +265,7 @@ const batching = (type) => {
if (type == 'import') {
dialogInfo.value.header.title = '导入数据'
dialogInfo.value.type = 'upload'
dialogInfo.value.size = 640
dialogInfo.value.size = 560
uploadFiles.value = []
// if (tabsActiveName.value == 'field' || tabsActiveName.value == 'naming') {
// uploadSteps.value[0].selectInfo.options = standardSetList.value
......@@ -291,7 +291,7 @@ const batching = (type) => {
if (isfileImport == '2' || isfileImport == '4') {
dialogInfo.value.header.title = '导入数据'
dialogInfo.value.type = 'upload'
dialogInfo.value.size = isfileImport == '4' ? 600 : 500;
dialogInfo.value.size = isfileImport == '4' ? 560 : 560;
uploadFiles.value = []
uploadInfo.value.uploadInfo.steps = uploadSteps.value
const content: any = [uploadInfo.value]
......@@ -516,9 +516,9 @@ onActivated(() => {
</div>
<Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @onUpload="onUpload" @uploadBtnClick="uploadBtnClick"
@cascaderChange="cascaderChange" @selectChange="selectChange">
<div>
<div style="overflow: auto;">
<div class="title" style="color:#333;margin:20px 0 10px">2、导入前请先导入文件的sheet与标准做对应</div>
<el-table :data="uploadSetting">
<el-table :data="uploadSetting" border height="310">
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column label="代码名称" prop="standardName"></el-table-column>
<el-table-column label="选择sheet页">
......
......@@ -13,7 +13,9 @@ import DictFileds from './components/dictFileds.vue'
import useCatchStore from "@/store/modules/catch";
import { download } from '@/utils/common'
import { getParamsList } from '@/api/modules/dataAsset'
import { getMetaStandardTree } from '@/api/modules/dataMetaService'
import { getMetaStandardTree, deleteMetaStandard,
getMetaStandardDataList, getMetaStandardDataFields
} from '@/api/modules/dataMetaService'
import router from '@/router'
import { TableColumnWidth } from '@/utils/enum';
import StandardDialog from './components/standardDialog.vue'
......@@ -46,47 +48,10 @@ const treeInfo = ref({
className: 'tree-list'
})
function nodeClick (data) {
// drawerInfo.value.visible = false
const changeCont = () => {
nextTick(() => {
treeInfo.value.currentNodeKey = data.value
console.log('nodeData', data)
treeInfo.value.currentObj = data
if (data.isLeaf) {
showFiledsPage.value = true
nextTick(() => {
dictFiledsRef.value.standardGuid = data.value
dictFiledsRef.value.standardName = data.label
treeCurrentNodeKey.value = data.value
dictFiledsRef.value.getFirstPageData()
})
} else {
showFiledsPage.value = false
getFirstPageData()
}
})
}
if (showFiledsPage.value) {
const toChange = dictFiledsRef.value.checkSave()
if (!toChange) {
ElMessageBox.confirm(
'存在未保存的数据,切换后会丢失,是否确定切换',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
).then(() => {
changeCont()
}).catch(() => {
treeInfo.value.currentNodeKey = dictGuid.value
})
} else {
changeCont()
}
} else {
changeCont()
}
getTableFields()
}
function treeCustomClick (node, type) {
console.log(node, type)
......@@ -97,6 +62,14 @@ function treeCustomClick (node, type) {
standardDialog.visible = true
return
}
if (type === 'delete') {
// 删除
ElMessageBox.confirm('确定删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => deleteTreeNode(node.data.guid))
}
}
function getTree () {
getMetaStandardTree().then((res:any) => {
......@@ -106,6 +79,19 @@ function getTree () {
item.showEdit = true
})
treeInfo.value.data = data
treeInfo.value.expandedKey = [data[0].guid]
treeInfo.value.currentNodeKey = data[0].guid
nodeClick(data[0])
}
})
}
function deleteTreeNode (guid) {
deleteMetaStandard([guid]).then((res:any) => {
if (res.code === proxy.$passCode) {
ElMessage.success('删除成功')
getTree()
} else {
ElMessage.error(res.msg)
}
})
}
......@@ -131,11 +117,11 @@ const tableInfo: any = ref({
fixedSelection: true,
fields: [
{ label: "序号", type: "index", width: 56, align: "center" },
{ label: '数据源标识符', field: 'codeName', width: 140 },
{ label: '数据元名称', field: 'standard', width: 140 },
{ label: '定义', field: 'standardName', width: 140 },
{ label: '数据类型', field: '', width: 120 },
{ label: '表示格式', field: 'createTime', width: TableColumnWidth }
// { label: '数据源标识符', field: 'codeName', width: 140 },
// { label: '数据元名称', field: 'standard', width: 140 },
// { label: '定义', field: 'standardName', width: 140 },
// { label: '数据类型', field: '', width: 120 },
// { label: '表示格式', field: 'createTime', width: TableColumnWidth }
],
data: [],
page: {
......@@ -156,6 +142,61 @@ const tableInfo: any = ref({
},
loading: false
})
function getFirstPageData () {
page.value.curr = 1
toSearch({})
}
function toSearch (val: any, clear: boolean = false) {
let params: any = Object.keys(val).length ? { ...val } : {}
let { currentNodeKey, currentObj } = treeInfo.value
params.pageIndex = page.value.curr;
params.pageSize = page.value.limit;
params.metaStandardGuid = currentObj.guid
getTable(params)
}
function getTable (params) {
tableInfo.value.loading = true
getMetaStandardDataList(params).then((res:any) => {
if (res.code === proxy.$passCode) {
let data = res.data
let list = res.data.records || []
list.forEach((item:any) => {
Object.keys(item.metaStandardValue).forEach(key => {
item[key] = item.metaStandardValue[key]
})
})
tableInfo.value.data = list
tableInfo.value.page.limit = data.pageSize
tableInfo.value.page.curr = data.pageIndex
tableInfo.value.page.rows = data.totalRows
}
}).finally(() => tableInfo.value.loading = false)
}
function getTableFields () {
let { currentObj } = treeInfo.value
const indexField = { label: '序号', type: 'index', width: 56, align: 'center' }
getMetaStandardDataFields(currentObj.guid).then((res:any) => {
if (res.code === proxy.$passCode && res.data) {
const data = res.data
const fields = data.map(item => {
return {
label: item.fileNameCodeName,
field: item.fileNameCode,
width: 140
}
})
fields.unshift(indexField)
tableInfo.value.fields = fields
} else {
tableInfo.value.fields = [indexField]
}
})
}
function tablePageChange (info) {
page.value.curr = Number(info.curr)
page.value.limit = Number(info.limit)
toSearch({})
}
const formItems: any = ref([
{
......@@ -290,6 +331,7 @@ const standardDialog = reactive({
guid: null
})
function openStandardDialog () {
standardDialog.type = 'add'
standardDialog.visible = true
}
......@@ -326,7 +368,7 @@ onBeforeMount(() => {
</div>
<div class="table_panel_wrap full">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tableSelectionChange="tableSelectionChange"
@tablePageChange="tablePageChange" @tableSwitchBeforeChange="tableSwitchBeforeChange" />
@tablePageChange="tablePageChange"/>
</div>
</div>
<StandardDialog
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!