Merge branch 'dev' into v1.18
This commit is contained in:
commit
b548e1149a
@ -509,6 +509,9 @@ public class PanelGroupService {
|
|||||||
if (dynamicDataMap == null) {
|
if (dynamicDataMap == null) {
|
||||||
DataEaseException.throwException("Please use the template after v1.9");
|
DataEaseException.throwException("Please use the template after v1.9");
|
||||||
}
|
}
|
||||||
|
//custom组件替换.tableId 和 parentFieldId 追加识别标识
|
||||||
|
templateData = templateData.replaceAll("\"tableId\":\"", "\"tableId\":\"no_auth");
|
||||||
|
templateData = templateData.replaceAll("\"fieldsParent\":\\{\"id\":\"", "\"fieldsParent\":\\{\"id\":\"no_auth");
|
||||||
|
|
||||||
List<PanelViewInsertDTO> panelViews = new ArrayList<>();
|
List<PanelViewInsertDTO> panelViews = new ArrayList<>();
|
||||||
List<PanelGroupExtendDataDTO> viewsData = new ArrayList<>();
|
List<PanelGroupExtendDataDTO> viewsData = new ArrayList<>();
|
||||||
|
|||||||
@ -138,6 +138,14 @@ export function fieldList(id, showLoading = true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function fieldListWithPermission(id, showLoading = true) {
|
export function fieldListWithPermission(id, showLoading = true) {
|
||||||
|
//初始模板中的过滤组件无需走后台
|
||||||
|
if (id.indexOf('no_auth') > -1) {
|
||||||
|
return new Promise(function(resolve) {
|
||||||
|
resolve({
|
||||||
|
data: []
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
return request({
|
return request({
|
||||||
url: '/dataset/field/listWithPermission/' + id,
|
url: '/dataset/field/listWithPermission/' + id,
|
||||||
loading: showLoading,
|
loading: showLoading,
|
||||||
|
|||||||
@ -108,6 +108,7 @@ export default {
|
|||||||
handler() {
|
handler() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.table.doLayout()
|
this.$refs.table.doLayout()
|
||||||
|
this.$emit('columnsChange')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
|
|||||||
@ -152,11 +152,17 @@ export default {
|
|||||||
},
|
},
|
||||||
resetDefaultValue(id) {
|
resetDefaultValue(id) {
|
||||||
if (this.inDraw && this.manualModify && this.element.id === id) {
|
if (this.inDraw && this.manualModify && this.element.id === id) {
|
||||||
const values = this.element.options.value
|
if (!this.element.options.value) {
|
||||||
this.form.min = values[0]
|
this.form.min = null
|
||||||
if (values.length > 1) {
|
this.form.max = null
|
||||||
this.form.max = values[1]
|
} else {
|
||||||
|
const values = this.element.options.value
|
||||||
|
this.form.min = values[0]
|
||||||
|
if (values.length > 1) {
|
||||||
|
this.form.max = values[1]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.search()
|
this.search()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -138,7 +138,7 @@
|
|||||||
<svg-icon
|
<svg-icon
|
||||||
:icon-class="showTable ? 'reference-table' : 'reference-field'"
|
:icon-class="showTable ? 'reference-table' : 'reference-field'"
|
||||||
/>
|
/>
|
||||||
{{ (showTable && fieldData.length) || tableData.length }}
|
{{ (showTable && fieldDataCopy.length) || tableDataCopy.length }}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -357,23 +357,7 @@ export default {
|
|||||||
},
|
},
|
||||||
'activeName': {
|
'activeName': {
|
||||||
handler(newName, oldName) {
|
handler(newName, oldName) {
|
||||||
if (this.activeName === 'assembly') {
|
|
||||||
this.allParams = JSON.parse(JSON.stringify(this.childViews.datasetParams))
|
|
||||||
} else {
|
|
||||||
if (this.datasetParams.length > 0) {
|
|
||||||
for (var j = 0; j < this.datasetParams.length; j++) {
|
|
||||||
var hasParam = false
|
|
||||||
for (var i = 0; i < this.childViews.datasetParams.length; i++) {
|
|
||||||
if (this.childViews.datasetParams[i].id === this.datasetParams[j].id) {
|
|
||||||
hasParam = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!hasParam) {
|
|
||||||
this.allParams.push(this.datasetParams[j])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1302,16 +1302,16 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCheckAllChange(apiItem, row, ref) {
|
handleCheckAllChange(apiItem, row, ref) {
|
||||||
this.errMsg = []
|
this.errMsg = []
|
||||||
this.handleCheckChange(apiItem, row)
|
this.handleCheckChange(this.apiItem, row)
|
||||||
apiItem.fields = []
|
this.apiItem.fields = []
|
||||||
this.handleFiledChange(apiItem, row)
|
this.handleFiledChange(this.apiItem, row)
|
||||||
if(ref === 'plxTable'){
|
if(ref === 'plxTable'){
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.plxTable?.reloadData(this.previewData(this.apiItem))
|
this.$refs.plxTable?.reloadData(this.previewData(this.apiItem))
|
||||||
})
|
})
|
||||||
}else {
|
}else {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.originPlxTable?.reloadData(this.previewData(this.originFieldItem))
|
this.$refs.originPlxTable?.reloadData(this.previewData(this.apiItem))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1114,6 +1114,25 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
reloadStatus(apiConfiguration = []) {
|
||||||
|
let arr = []
|
||||||
|
let arrError = []
|
||||||
|
let arrSuccess = []
|
||||||
|
if (!Array.isArray(apiConfiguration)) {
|
||||||
|
arr = JSON.parse(apiConfiguration)
|
||||||
|
if (!Array.isArray(arr)) return
|
||||||
|
}
|
||||||
|
arrError = arr.filter(ele => ele.status === 'Error').map(ele => ele.name)
|
||||||
|
arrSuccess = arr.filter(ele => ele.status === 'Success').map(ele => ele.name)
|
||||||
|
this.form.apiConfiguration.forEach(ele => {
|
||||||
|
if (arrError.includes(ele.name)) {
|
||||||
|
ele.status = 'Error'
|
||||||
|
}
|
||||||
|
if (arrSuccess.includes(ele.name)) {
|
||||||
|
ele.status = 'Success'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
validaDatasource() {
|
validaDatasource() {
|
||||||
if (!this.form.configuration.schema && this.form.type === 'oracle') {
|
if (!this.form.configuration.schema && this.form.type === 'oracle') {
|
||||||
this.openMessageSuccess('datasource.please_choose_schema', 'error')
|
this.openMessageSuccess('datasource.please_choose_schema', 'error')
|
||||||
@ -1167,6 +1186,9 @@ export default {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.openMessageSuccess('datasource.validate_success')
|
this.openMessageSuccess('datasource.validate_success')
|
||||||
} else {
|
} else {
|
||||||
|
if (data.type === 'api') {
|
||||||
|
this.reloadStatus(res.data?.configuration)
|
||||||
|
}
|
||||||
if (res.message.length < 2500) {
|
if (res.message.length < 2500) {
|
||||||
this.openMessageSuccess(res.message, 'error')
|
this.openMessageSuccess(res.message, 'error')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -118,13 +118,16 @@
|
|||||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||||
:table-data="data"
|
:table-data="data"
|
||||||
:columns="checkedColumnNames"
|
:columns="checkedColumnNames"
|
||||||
|
current-row-key="email"
|
||||||
:pagination="paginationConfig"
|
:pagination="paginationConfig"
|
||||||
|
@columnsChange="columnsChange"
|
||||||
@sort-change="sortChange"
|
@sort-change="sortChange"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="username"
|
prop="username"
|
||||||
|
key="username"
|
||||||
label="ID"
|
label="ID"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -137,6 +140,7 @@
|
|||||||
<!-- <el-table-column prop="gender" :label="$t('commons.gender')" width="60" /> -->
|
<!-- <el-table-column prop="gender" :label="$t('commons.gender')" width="60" /> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="from"
|
prop="from"
|
||||||
|
key="from"
|
||||||
:label="$t('user.source')"
|
:label="$t('user.source')"
|
||||||
width="80"
|
width="80"
|
||||||
>
|
>
|
||||||
@ -237,6 +241,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
key="__operation"
|
||||||
slot="__operation"
|
slot="__operation"
|
||||||
:label="$t('commons.operating')"
|
:label="$t('commons.operating')"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
@ -554,6 +559,13 @@ export default {
|
|||||||
this.showScroll = dom && dom.scrollWidth > dom.offsetWidth
|
this.showScroll = dom && dom.scrollWidth > dom.offsetWidth
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
columnsChange() {
|
||||||
|
const arr = this.data
|
||||||
|
this.data = []
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.data = arr
|
||||||
|
})
|
||||||
|
},
|
||||||
search() {
|
search() {
|
||||||
const param = {
|
const param = {
|
||||||
orders: formatOrders(this.orderConditions),
|
orders: formatOrders(this.orderConditions),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user