Browse Source

字段设置完善

master
陈薪名 1 year ago
parent
commit
d29b78e8b0
  1. 55
      src/components/rowDrop/index.vue

55
src/components/rowDrop/index.vue

@ -94,23 +94,21 @@ const formatData = (val) => {
// //
const save = () => { const save = () => {
let saveDate = tableColumnsFun[props.routeName].allSchemas.tableColumns let saveDate = []
sort(saveDate, allData) //
console.log(99, saveDate) saveDate.push(tableColumnsFun[props.routeName].allSchemas.tableColumns[0])
console.log(101, allData.value)
// // allData.value.forEach((item,index) => {
// saveDate.push(tableColumnsFun[props.routeName].allSchemas.tableColumns[0]) const _item = tableColumnsFun[props.routeName].allSchemas.tableColumns.find(itemColumns => (itemColumns.label == item ))
// // _item.isTable = false
// saveDate.push(tableColumnsFun[props.routeName].allSchemas.tableColumns[tableColumnsFun[props.routeName].allSchemas.tableColumns.length-1]) if (checkedDataList.value.indexOf(_item.label) > 0) {
// checkedDataList.value.forEach((item,index) => { _item.isTable = true
// item.isTable = false }
// if (tableColumnsFun[props.routeName].allSchemas.tableColumns.indexOf(item) > 0) { saveDate.push(_item)
// item.isTable = true })
// saveDate.push(item) //
// } else { saveDate.push(tableColumnsFun[props.routeName].allSchemas.tableColumns[tableColumnsFun[props.routeName].allSchemas.tableColumns.length-1])
console.log(115,saveDate)
// }
// })
// tableColumnsFun[props.routeName].allSchemas.tableColumns.forEach((item,index) => { // tableColumnsFun[props.routeName].allSchemas.tableColumns.forEach((item,index) => {
// if (index == 0) { // if (index == 0) {
// saveDate.push(item) // saveDate.push(item)
@ -126,11 +124,11 @@ const save = () => {
// } // }
// }) // })
// updataTableColumns(saveDate) updataTableColumns(saveDate)
// RedisApi.addRedis({key: props.routeName,value: JSON.stringify(saveDate)}).then(res => { RedisApi.addRedis({key: props.routeName,value: JSON.stringify(saveDate)}).then(res => {
// }).catch(err => { }).catch(err => {
// console.log(err) console.log(err)
// }) })
} }
// //
@ -213,6 +211,19 @@ const initSelectSta = () => {
} }
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
checkedDataList.value = []
allData.value = []
dataList.value.forEach((item, index) => {
//
if (index != 0) {
if (item.field != 'action') {
checkedDataList.value.push(item.label)
allData.value.push(item.label)
}
}
})
checkAll.value = true
updataTableColumns(dataList.value)
}) })
} }

Loading…
Cancel
Save