mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 10:35:07 +08:00
Merge branch 'master' of gitee.com:zhijiantianya/ruoyi-vue-pro into master
Signed-off-by: xingyu <xingyu4j@vip.qq.com>
This commit is contained in:
@ -71,6 +71,16 @@
|
||||
padding: 10px 20px 0;
|
||||
}
|
||||
|
||||
.el-dialog{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: calc(100% - 30px);
|
||||
max-height: calc(100% - 70px);
|
||||
.el-dialog__body {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table {
|
||||
.el-table__header-wrapper, .el-table__fixed-header-wrapper {
|
||||
th {
|
||||
|
@ -70,6 +70,10 @@ console.log(request)
|
||||
Vue.prototype.$axios = request
|
||||
import '@/styles/index.scss'
|
||||
|
||||
// 默认点击背景不关闭弹窗
|
||||
import ElementUI from 'element-ui'
|
||||
ElementUI.Dialog.props.closeOnClickModal.default = false
|
||||
|
||||
/**
|
||||
* If you don't want to use mock-server
|
||||
* you want to use MockJs for mock api
|
||||
|
@ -1,13 +1,32 @@
|
||||
/**
|
||||
* 将服务端返回的 fields 字符串数组,解析成 JSON 数组
|
||||
* 如果指定了 variables 参数可对表单进行初始化
|
||||
*
|
||||
* @param fields JSON 字符串数组
|
||||
* @param variables Object 表单初始值
|
||||
* @returns {*[]} JSON 数组
|
||||
*/
|
||||
export function decodeFields(fields) {
|
||||
const drawingList = []
|
||||
fields.forEach(item => {
|
||||
drawingList.push(JSON.parse(item))
|
||||
export function decodeFields(fields, variables) {
|
||||
const drawingList = (fields || []).map(json => {
|
||||
const item = JSON.parse(json)
|
||||
|
||||
if (typeof variables === 'undefined' ) return item
|
||||
|
||||
const setDefault = (item, variables) => {
|
||||
if (typeof variables[item.__vModel__] !== 'undefined') {
|
||||
item.__config__.defaultValue = variables[item.__vModel__]
|
||||
}
|
||||
if (item.__config__.children && item.__config__.children.length) {
|
||||
item.__config__.children.forEach(child => {
|
||||
setDefault(child, variables)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
setDefault(item, variables)
|
||||
|
||||
return item
|
||||
})
|
||||
|
||||
return drawingList
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ import {
|
||||
inputComponents, selectComponents, layoutComponents, formConf
|
||||
} from '@/components/generator/config'
|
||||
import {
|
||||
exportDefault, beautifierConf, isNumberStr, titleCase, deepClone, isObjectObject
|
||||
exportDefault, beautifierConf, isNumberStr, titleCase, deepClone
|
||||
} from '@/utils/index'
|
||||
import {
|
||||
makeUpHtml, vueTemplate, vueScript, cssStyle
|
||||
@ -272,7 +272,7 @@ export default {
|
||||
arr.reduce((pre, item, i) => {
|
||||
if (arr.length === i + 1) {
|
||||
pre[item] = data
|
||||
} else if (!isObjectObject(pre[item])) {
|
||||
} else if (pre[item]===undefined) {
|
||||
pre[item] = {}
|
||||
}
|
||||
return pre[item]
|
||||
@ -300,7 +300,7 @@ export default {
|
||||
url
|
||||
}).then(resp => {
|
||||
this.setLoading(component, false)
|
||||
this.setRespData(component, resp.data)
|
||||
this.setRespData(component, resp)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user