功能变化: 优化组件

pull/102/head
李强 2023-06-26 11:24:17 +08:00
parent 00178bb256
commit b3c744e855
11 changed files with 50 additions and 23 deletions

View File

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -310,7 +310,9 @@ export default {
// log.debug('value')
// return
// }
item.url = this.baseURL + url
if (item.url.indexOf('http') !== 0 && item.url.indexOf('https') !== 0 && item.url.indexOf(this.baseURL) !== 0) {
item.url = this.baseURL + item.url
}
if (item.response != null && item.response.url != null) {
list.push({ ...item.response })
} else {

View File

@ -65,6 +65,7 @@ export default {
type: Object,
default () {
return {
isInitRows: true, //
index: {
name: '序号',
span: 2
@ -135,18 +136,23 @@ export default {
return res
},
currentForm () {
console.log(1212, this.value)
if (!this.value || !this.value[0]) {
const fields = {
_id: this.value?.length || 0
}
for (const key in this.elProps.fields) {
fields[key] = this.elProps.fields[key].default || null
}
this.$emit('change', [fields])
this.$emit('input', [fields])
return {
data: [fields]
if (this.elProps.isInitRows) {
const fields = {
_id: this.value?.length || 0
}
for (const key in this.elProps.fields) {
fields[key] = this.elProps.fields[key].default || null
}
this.$emit('change', [fields])
this.$emit('input', [fields])
return {
data: [fields]
}
} else {
return {
data: []
}
}
}
return {
@ -185,12 +191,12 @@ export default {
//
addDomain () {
const fields = {
_id: this.value.length
_id: this.value?.length || 0
}
for (const key in this.elProps.fields) {
fields[key] = this.elProps.fields[key].default || null
}
console.log(12121212, this.currentForm.data, fields)
fields.sort = (this.value?.length || 0) + 1
this.currentForm.data.push(fields)
this.$emit('change', this.currentForm.data)
this.$emit('input', this.currentForm.data)

View File

@ -217,7 +217,7 @@ export default {
params.page = this.pageConfig.page
params.limit = this.pageConfig.limit
}
if (val.toString().length > 0) {
if (val && val.toString().length > 0) {
// value
const { url, value, label } = this.dict
params[value] = val

View File

@ -26,6 +26,16 @@
}} {{ elProps.unit }}</span>
</el-button>
</div>
<div v-if="elProps.type === 'strList'">
<el-descriptions class="margin-top" :column="1" size="mini" border>
<el-descriptions-item v-for="(item,index) in value" :key="index" labelStyle="width: 60px;">
<template slot="label">
选项{{ index + 1 }}
</template>
{{ item[dict.label] }}
</el-descriptions-item>
</el-descriptions>
</div>
<div v-else-if="elProps.type === 'ueditor'">
<el-popover
placement="right"
@ -122,7 +132,6 @@ export default {
params[this.dict.value] = this.value
}
params.query = `{${this.dict.value},${this.dict.label}}`
console.log(12, params)
request({ url: this.dict.url, params: params }).then(ret => {
this.data = ret.data.data || ret.data
})

View File

@ -70,12 +70,23 @@ const frameOut = [
/**
* 第三方登录
*/
const pluginsType = checkPlugins('dvadmin-oauth2-web')
if (pluginsType) {
const oauth2PluginsType = checkPlugins('dvadmin-oauth2-web')
if (oauth2PluginsType) {
frameOut.push({
path: '/oauth2',
name: 'login',
component: pluginsType === 'local' ? _import('plugins/dvadmin-oauth2-web/src/login/index') : pluginImport('dvadmin-oauth2-web/src/login/index')
component: oauth2PluginsType === 'local' ? _import('plugins/dvadmin-oauth2-web/src/login/index') : pluginImport('dvadmin-oauth2-web/src/login/index')
})
}
/**
* 租户申请注册
*/
const tenantsPluginsType = checkPlugins('dvadmin-tenants-web')
if (tenantsPluginsType) {
frameOut.push({
path: '/register',
name: 'tenantsRegister',
component: tenantsPluginsType === 'local' ? _import('plugins/dvadmin-tenants-web/src/register/index') : pluginImport('dvadmin-tenants-web/src/register/index')
})
}
/**

View File

@ -60,11 +60,11 @@ export default {
},
computed: {
...mapState('d2admin', {
siteLogo: state => state.settings.data['login.site_logo'] || require('./image/dvadmin.png'), // logo
siteLogo: state => state.settings.data['login.site_logo'] || require('@/assets/image/dvadmin.png'), // logo
keepRecord: state => state.settings.data['login.keep_record'],
siteName: state => state.settings.data['login.site_name'], //
copyright: state => state.settings.data['login.copyright'],
loginBackground: state => state.settings.data['login.login_background'] || require('./image/bg.jpg'), //
loginBackground: state => state.settings.data['login.login_background'] || require('@/assets/image/bg.jpg'), //
helpUrl: state => state.settings.data['login.help_url'], //
privacyUrl: state => state.settings.data['login.privacy_url'], //
clauseUrl: state => state.settings.data['login.clause_url'], //
@ -145,7 +145,6 @@ export default {
left: 0;
height: 100%;
width: 100%;
background-image: url(./image/bg.jpg);
background-position: center 0;
background-repeat: no-repeat;
background-attachment: fixed;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View File

@ -1,7 +1,7 @@
<template>
<div
class="w3l-signinform"
:style="{background:'url(' +(loginBackground || require('./image/bg.jpg')) +') no-repeat center', backgroundSize: '100% 100%' }"
:style="{background:'url(' +(loginBackground || require('@/assets/image/bg.jpg')) +') no-repeat center', backgroundSize: '100% 100%' }"
>
<!-- container -->
<div class="wrapper">