Merge branch 'master' of github.com:gcpaas/DataRoom

main
liu.tao3 2 years ago
commit 2e8c08651b

@ -13,6 +13,7 @@ import * as $dataRoomAxios from 'data-room-ui/js/utils/http.js'
import { registerConfig } from '@gcpaas/data-room-ui'
import remoteComponents from '@/remoteComponents/exports.js'
import customDatasetComponents from '@/customDatasetComponents/exports.js'
import customPlots from '@/customPlots/exports'
Vue.use(ElementUI, { size: 'mini' })
registerConfig(
{
@ -65,7 +66,10 @@ promise.polyfill()
Vue.use(ElementUI, { size: 'mini' })
Vue.prototype.$dataRoomAxios = $dataRoomAxios
Vue.config.productionTip = false
// 兼容ie下双向绑定事件
Vue.prototype.inputChange = function (e) {
return e.target.value
}
/* eslint-disable no-new */
new Vue({
el: '#app',

File diff suppressed because it is too large Load Diff

@ -266,6 +266,7 @@ import checkDatasource from 'data-room-ui/DataSourceManagement/src/checkDatasour
import CustomEditForm from './CustomEditForm.vue'
import { pageMixins } from 'data-room-ui/js/mixins/page'
import OriginalEditForm from './OriginalEditForm.vue'
import HttpEditForm from './HttpEditForm.vue'
import DatasetTypeDialog from './DatasetTypeDialog.vue'
import StoredProcedureEditForm from './StoredProcedureEditForm.vue'
import { datasetPage, datasetRemove, datasetCheck } from 'data-room-ui/js/utils/datasetConfigService'
@ -284,7 +285,8 @@ export default {
StoredProcedureEditForm,
ScriptEditForm,
JsEditForm,
checkDatasource
checkDatasource,
HttpEditForm
},
mixins: [pageMixins],
props: {
@ -545,7 +547,8 @@ export default {
{ name: '存储过程数据集', datasetType: 'storedProcedure', componentName: 'StoredProcedureEditForm' },
{ name: 'JSON数据集', datasetType: 'json', componentName: 'JsonEditForm' },
{ name: '脚本数据集', datasetType: 'script', componentName: 'ScriptEditForm' },
{ name: 'JS数据集', datasetType: 'js', componentName: 'JsEditForm' }
{ name: 'JS数据集', datasetType: 'js', componentName: 'JsEditForm' },
{ name: 'HTTP数据集', datasetType: 'http', componentName: 'HttpEditForm' }
]
if (window.BS_CONFIG?.datasetTypeList&&window.BS_CONFIG?.datasetTypeList?.length!=0) {
this.datasetTypeList = [{ name: '全部', datasetType: '' }, ...list.filter(item => window.BS_CONFIG?.datasetTypeList.findIndex(x => x === item.datasetType) !== -1)]

@ -67,7 +67,7 @@
border-color: var(--bs-el-border) !important;
background: var(--bs-background-2) !important;
background-color: var(--bs-background-2) !important;
th.el-table__cell.is-leaf{
th.el-table__cell.is-leaf {
border-color: var(--bs-el-border) !important;
}
@ -543,15 +543,15 @@
background: var(--bs-background-2) !important;
border-color: var(--bs-background-1) !important;
background-color: var(--bs-background-2) !important;
.el-button--default{
.el-button--default {
color: var(--bs-el-text) !important;
border-color: var(--bs-background-1) !important;
background-color: var(--bs-background-2) !important;
}
.el-color-picker__trigger{
border-color: var(--bs-background-1) !important;
.el-color-picker__trigger {
border-color: var(--bs-background-1) !important;
}
.el-color-picker__panel{
.el-color-picker__panel {
border-color: var(--bs-background-1) !important;
}
.el-input__inner {
@ -602,32 +602,79 @@
.bs-el-date-picker {
left: -115px !important;
background-color: var(--bs-background-1) !important;
.el-date-picker__time-header{
.el-date-picker__time-header {
border-color: var(--bs-el-border) !important;
}
.el-picker-panel{
.el-date-picker__header{
.popper__arrow::after {
border-bottom-color: var(--bs-background-1) !important;
border-top-color: var(--bs-background-1) !important;
}
.el-date-picker__header {
background: var(--bs-el-background-1) !important;
background-color: var(--bs-el-background-1) !important;
.el-date-picker__header-label {
color: var(--bs-el-text) !important;
}
.el-picker-panel__icon-btn {
color: var(--bs-el-text) !important;
}
}
.el-date-table {
background: var(--bs-el-background-1) !important;
background-color: var(--bs-el-background-1) !important;
th {
color: var(--bs-el-text) !important;
border-color: var(--bs-el-border) !important;
}
.el-button--text {
color: var(--bs-el-text) !important;
background: var(--bs-background-2) !important;
background-color: var(--bs-background-2) !important;
}
.el-date-table{
background: var(--bs-background-2) !important;
background-color: var(--bs-background-2) !important;
th{
border-color: var(--bs-el-border) !important;
}
}
.el-year-table {
background: var(--bs-el-background-1) !important;
background-color: var(--bs-el-background-1) !important;
.disabled {
.cell {
background-color: var(--bs-background-2) !important;
}
.el-button--text{
}
td {
.cell {
color: var(--bs-el-text) !important;
background: var(--bs-background-2) !important;
}
}
}
.el-month-table {
background: var(--bs-el-background-1) !important;
background-color: var(--bs-el-background-1) !important;
.disabled {
.cell {
background-color: var(--bs-background-2) !important;
}
}
}
td {
.cell {
color: var(--bs-el-text) !important;
}
}
}
.el-date-table {
.available {
color: var(--bs-el-text) !important;
}
}
.el-picker-panel__footer {
background-color: var(--bs-background-1) !important;
border-top: 1px solid var(--bs-el-border) !important;
}
.el-picker-panel {
.el-button--text {
color: var(--bs-el-text) !important;
}
}
.el-date-table td.disabled div {
background-color: var(--bs-background-2) !important;
}
@ -676,15 +723,15 @@
}
}
.bs-el-tabs{
.el-tabs__item{
.bs-el-tabs {
.el-tabs__item {
color: var(--bs-el-text) !important;
}
.is-active{
.is-active {
color: var(--bs-el-color-primary) !important;
}
.el-tabs__nav-wrap{
&:after{
.el-tabs__nav-wrap {
&:after {
background-color: var(--bs-background-1) !important;
}
}

@ -0,0 +1,54 @@
import axios from 'axios'
import { Loading, Message } from 'element-ui'
export default function axiosFormatting (customConfig) {
const httpConfig = {
timeout: 1000 * 30,
baseURL: '',
headers: {
...customConfig.headers
}
}
// let loadingInstance = null // 加载全局的loading
const instance = axios.create(httpConfig)
/** 添加请求拦截器 **/
instance.interceptors.request.use(config => {
/**
* 在这里可以根据业务需求可以在发送请求之前做些什么
* config.headers['token'] = sessionStorage.getItem('token') || ''
*/
// 执行请求脚本
eval(customConfig.requestScript)
return config
}, error => {
// 对请求错误做些什么
return Promise.reject(error)
})
/** 添加响应拦截器 **/
instance.interceptors.response.use(response => {
if (response.data.code === 200) {
// 执行响应脚本
const data = response.data.data
eval(customConfig.responseScript)
return Promise.resolve(data)
} else {
Message({
message: response.data.message,
type: 'error'
})
return Promise.reject(response.data.message)
}
})
return new Promise((resolve, reject) => {
instance({
method: customConfig.method,
url: customConfig.url,
params: customConfig.params,
data: customConfig.method === 'post' ? customConfig.body : undefined
}).then(response => {
resolve(response)
}).catch(error => {
reject(error)
})
})
}
Loading…
Cancel
Save