提交 ac7d2227 authored 作者: kxjia's avatar kxjia

tb2.AttachTable.vue 组件 不能回显其他

上级 0693e358
...@@ -11,7 +11,34 @@ rebel.xml ...@@ -11,7 +11,34 @@ rebel.xml
**/*.lock **/*.lock
os_del.cmd os_del.cmd
os_del_doc.cmd os_del_doc.cmd
.svn
derby.log
**/target
**/logs
## front
**/*.lock
os_del.cmd
os_del_doc.cmd
.svn .svn
derby.log derby.log
.cursor .cursor
.history .history
\ No newline at end of file
node_modules/
dist/
build/
.env
.DS_Store
*.log
*.tmp
*.cache
.*
/logs/*
!/logs/.gitkeep
...@@ -10,15 +10,18 @@ VITE_GLOB_APP_SHORT_NAME = 科技风险管理平台 ...@@ -10,15 +10,18 @@ VITE_GLOB_APP_SHORT_NAME = 科技风险管理平台
# 单点登录服务端地址 # 单点登录服务端地址
VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas
# 是否开启单点登录 # 是否开启单点登录
VITE_GLOB_APP_OPEN_SSO = false VITE_GLOB_APP_OPEN_SSO = false
# 开启微前端模式 # 开启微前端模式
VITE_GLOB_APP_OPEN_QIANKUN=true VITE_GLOB_APP_OPEN_QIANKUN=true
#后台接口全路径地址(必填)
VITE_GLOB_DOMAIN_URL=http://47.98.203.68:8080/stm/
# 文件预览地址 # 文件预览地址
# VITE_GLOB_ONLINE_VIEW_URL=http://fileview.jeecg.com/onlinePreview # VITE_GLOB_ONLINE_VIEW_URL=http://fileview.jeecg.com/onlinePreview
VITE_GLOB_ONLINE_VIEW_URL=http://47.98.203.68:8080/stm/sys/common/static/
VITE_GLOB_ONLINE_VIEW_URL=http://47.98.203.68:82/stm/sys/common/static/
...@@ -19,7 +19,9 @@ VITE_GLOB_API_URL=/stm ...@@ -19,7 +19,9 @@ VITE_GLOB_API_URL=/stm
# VITE_GLOB_DOMAIN_URL=https://itrm.westmining.com:8080/stm # VITE_GLOB_DOMAIN_URL=https://itrm.westmining.com:8080/stm
# VITE_GLOB_ONLINE_VIEW_URL=https://itrm.westmining.com:8080/stm/sys/common/static/ # VITE_GLOB_ONLINE_VIEW_URL=https://itrm.westmining.com:8080/stm/sys/common/static/
VITE_GLOB_DOMAIN_URL=http://47.98.203.68:8080/stm #后台接口全路径地址(必填)
VITE_GLOB_DOMAIN_URL=http://47.98.203.68:8080/stm/
VITE_GLOB_ONLINE_VIEW_URL=http://47.98.203.68:8080/stm/sys/common/static/ VITE_GLOB_ONLINE_VIEW_URL=http://47.98.203.68:8080/stm/sys/common/static/
# 接口父路径前缀 # 接口父路径前缀
......
...@@ -565,21 +565,9 @@ export const tableFormData = [ ...@@ -565,21 +565,9 @@ export const tableFormData = [
field: 'COL105', field: 'COL105',
formType: 'checkbox-group', formType: 'checkbox-group',
options: [ options: [
'温度', '温度', '湿度','防水','防磁','防雷',
'湿度', '防鼠','消防','安防','空调','UPS',
'防水', '发电机','配电','机房门禁','逃生通道','其他',
'防磁',
'防雷',
'防鼠',
'消防',
'安防',
'空调',
'UPS',
'发电机',
'配电',
'机房门禁',
'逃生通道',
'其他',
], ],
otherOption: true, otherOption: true,
otherField: 'COL106', otherField: 'COL106',
......
...@@ -231,7 +231,6 @@ const getFormData = () => { ...@@ -231,7 +231,6 @@ const getFormData = () => {
} }
const setFormData = (dataVale) => { const setFormData = (dataVale) => {
alert(JSON.stringify(dataVale))
Object.assign(formData, dataVale); Object.assign(formData, dataVale);
} }
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
@click="safeAddNewRecord" @click="safeAddNewRecord"
style="margin: 0 5px;" style="margin: 0 5px;"
>新增记录</vxe-button> >新增记录</vxe-button>
<!-- <vxe-button <!-- <vxe-button
type="text" type="text"
icon="vxe-icon-fullscreen" icon="vxe-icon-fullscreen"
...@@ -528,7 +529,7 @@ const getFormData = () => { ...@@ -528,7 +529,7 @@ const getFormData = () => {
} }
const setFormData = (dataVale) => { const setFormData = (dataVale) => {
console.log('MultiColumnTable setFormData called, dataVale:', dataVale);
tableData.value = dataVale.map((row, rowIndex) => { tableData.value = dataVale.map((row, rowIndex) => {
const newRow = { ...row } const newRow = { ...row }
return newRow return newRow
...@@ -546,12 +547,19 @@ const setFormData = (dataVale) => { ...@@ -546,12 +547,19 @@ const setFormData = (dataVale) => {
if (child && child.setFormData) { if (child && child.setFormData) {
const tableData: Record<string, any> = {}; const tableData: Record<string, any> = {};
const fieldWithGrid = field as any; const fieldWithGrid = field as any;
console.log('MultiColumnTable AttachTable - fieldWithGrid:', fieldWithGrid);
if (fieldWithGrid.gridOptions && fieldWithGrid.gridOptions.datas) { if (fieldWithGrid.gridOptions && fieldWithGrid.gridOptions.datas) {
fieldWithGrid.gridOptions.datas.forEach((dataRow: any, dataRowIndex: number) => { fieldWithGrid.gridOptions.datas.forEach((dataRow: any, dataRowIndex: number) => {
Object.values(dataRow).forEach((cellValue: any, cellIndex: number) => { Object.values(dataRow).forEach((cellValue: any, cellIndex: number) => {
if (cellValue && typeof cellValue === 'object' && cellValue.field) { if (cellValue && typeof cellValue === 'object') {
tableData[cellValue.field] = row[cellValue.field]; if (cellValue.field) {
tableData[cellValue.field] = row[cellValue.field];
}
if (cellValue.extraField) {
tableData[cellValue.extraField] = row[cellValue.extraField];
}
if (cellValue.otherField) {
tableData[cellValue.otherField] = row[cellValue.otherField];
}
} }
}); });
}); });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论