功能变化: 优化组件

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') // log.debug('value')
// return // 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) { if (item.response != null && item.response.url != null) {
list.push({ ...item.response }) list.push({ ...item.response })
} else { } else {

View File

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

View File

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

View File

@ -26,6 +26,16 @@
}} {{ elProps.unit }}</span> }} {{ elProps.unit }}</span>
</el-button> </el-button>
</div> </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'"> <div v-else-if="elProps.type === 'ueditor'">
<el-popover <el-popover
placement="right" placement="right"
@ -122,7 +132,6 @@ export default {
params[this.dict.value] = this.value params[this.dict.value] = this.value
} }
params.query = `{${this.dict.value},${this.dict.label}}` params.query = `{${this.dict.value},${this.dict.label}}`
console.log(12, params)
request({ url: this.dict.url, params: params }).then(ret => { request({ url: this.dict.url, params: params }).then(ret => {
this.data = ret.data.data || ret.data this.data = ret.data.data || ret.data
}) })

View File

@ -70,12 +70,23 @@ const frameOut = [
/** /**
* 第三方登录 * 第三方登录
*/ */
const pluginsType = checkPlugins('dvadmin-oauth2-web') const oauth2PluginsType = checkPlugins('dvadmin-oauth2-web')
if (pluginsType) { if (oauth2PluginsType) {
frameOut.push({ frameOut.push({
path: '/oauth2', path: '/oauth2',
name: 'login', 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: { computed: {
...mapState('d2admin', { ...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'], keepRecord: state => state.settings.data['login.keep_record'],
siteName: state => state.settings.data['login.site_name'], // siteName: state => state.settings.data['login.site_name'], //
copyright: state => state.settings.data['login.copyright'], 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'], // helpUrl: state => state.settings.data['login.help_url'], //
privacyUrl: state => state.settings.data['login.privacy_url'], // privacyUrl: state => state.settings.data['login.privacy_url'], //
clauseUrl: state => state.settings.data['login.clause_url'], // clauseUrl: state => state.settings.data['login.clause_url'], //
@ -145,7 +145,6 @@ export default {
left: 0; left: 0;
height: 100%; height: 100%;
width: 100%; width: 100%;
background-image: url(./image/bg.jpg);
background-position: center 0; background-position: center 0;
background-repeat: no-repeat; background-repeat: no-repeat;
background-attachment: fixed; background-attachment: fixed;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View File

@ -1,7 +1,7 @@
<template> <template>
<div <div
class="w3l-signinform" 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 --> <!-- container -->
<div class="wrapper"> <div class="wrapper">