提交 c6373445 authored 作者: taojinlong's avatar taojinlong

resolve conflict

...@@ -21,8 +21,8 @@ public class DefaultLicenseService { ...@@ -21,8 +21,8 @@ public class DefaultLicenseService {
private static final String LICENSE_ID = "fit2cloud_license"; private static final String LICENSE_ID = "fit2cloud_license";
private static final String validatorUtil = "/usr/bin/validator"; private static final String validatorUtil = "/usr/bin/validator";
private static final String product = "cmp"; private static final String product = "dataease";
private static final String[] NO_PLU_LIMIT_MODULES = new String[]{"dashboard", "gateway"}; /*private static final String[] NO_PLU_LIMIT_MODULES = new String[]{"dashboard", "gateway"};*/
public F2CLicenseResponse validateLicense(String product, String licenseKey){ public F2CLicenseResponse validateLicense(String product, String licenseKey){
List<String> command = new ArrayList<String>(); List<String> command = new ArrayList<String>();
......
package io.dataease.controller;
import io.dataease.commons.license.F2CLicenseResponse;
import io.dataease.service.AboutService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Map;
@RequestMapping("/about")
@RestController
public class AboutController {
@Resource
private AboutService aboutService;
@PostMapping("/license/update")
public F2CLicenseResponse updateLicense(@RequestBody Map<String, String> map) {
return aboutService.updateLicense(map.get("license"));
}
@PostMapping("/license/validate")
public F2CLicenseResponse validateLicense(@RequestBody Map<String, String> map) {
return aboutService.validateLicense(map.get("license"));
}
@GetMapping("/build/version")
public Object getBuildVersion() {
return aboutService.getBuildVersion();
}
}
package io.dataease.service;
import io.dataease.commons.license.DefaultLicenseService;
import io.dataease.commons.license.F2CLicenseResponse;
import io.dataease.commons.utils.CommonBeanFactory;
import io.dataease.commons.utils.LogUtil;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.io.File;
import java.util.Optional;
@Service
public class AboutService {
private static final String BUILD_VERSION = "/opt/fit2cloud/conf/version";
private static final String product = "dataease";
@Resource
private DefaultLicenseService defaultLicenseService;
public F2CLicenseResponse updateLicense(String licenseKey) {
F2CLicenseResponse f2CLicenseResponse = defaultLicenseService.updateLicense(product, licenseKey);
return f2CLicenseResponse;
}
public F2CLicenseResponse validateLicense(String licenseKey) {
if (StringUtils.isNotBlank(licenseKey)) {
return defaultLicenseService.validateLicense(product, licenseKey);
} else {
return defaultLicenseService.validateLicense();
}
}
public String getBuildVersion() {
try {
File file = new File(BUILD_VERSION);
if (file.exists()) {
String version = FileUtils.readFileToString(file, "UTF-8");
if (StringUtils.isNotBlank(version)) {
return version;
}
}
String property = CommonBeanFactory.getBean(Environment.class).getProperty("cmp.version");
String result = Optional.ofNullable(property).orElse("V1.0");
return result;
} catch (Exception e) {
LogUtil.error("failed to get build version.", e);
}
return "unknown";
}
}
import request from '@/utils/request'
export function validate(data) {
return request({
url: '/about/license/validate',
method: 'post',
data
})
}
export function buildVersion() {
return request({
url: '/about/build/version',
method: 'get'
})
}
export function updateInfo(data) {
return request({
url: '/about/license/update',
method: 'post',
data
})
}
...@@ -82,7 +82,9 @@ export default { ...@@ -82,7 +82,9 @@ export default {
thirdparty: 'Or connect with', thirdparty: 'Or connect with',
thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !', thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !',
expires: 'Login token expired, please login again', expires: 'Login token expired, please login again',
tokenError: 'Token error, please login again' tokenError: 'Token error, please login again',
username_error: 'Please enter the correct user name',
password_error: 'The password can not be less than 6 digits'
}, },
commons: { commons: {
icon: 'Icon', icon: 'Icon',
...@@ -776,7 +778,8 @@ export default { ...@@ -776,7 +778,8 @@ export default {
edit_custom_table: 'Edit self help dataset', edit_custom_table: 'Edit self help dataset',
edit_field: 'Edit Field', edit_field: 'Edit Field',
preview_100_data: 'Show 100 lines data', preview_100_data: 'Show 100 lines data',
invalid_table_check: 'Please sync data first.' invalid_table_check: 'Please sync data first.',
parse_error: 'Parse Error'
}, },
datasource: { datasource: {
datasource: 'Data Source', datasource: 'Data Source',
......
...@@ -82,7 +82,9 @@ export default { ...@@ -82,7 +82,9 @@ export default {
thirdparty: '第三方登陸', thirdparty: '第三方登陸',
thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!', thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!',
expires: '登陸信息过期,请重新登陸', expires: '登陸信息过期,请重新登陸',
tokenError: '信息错误,请重新登陸' tokenError: '信息错误,请重新登陸',
username_error: '請輸入正確的用戶名',
password_error: '密碼不小於6位'
}, },
commons: { commons: {
icon: '圖標', icon: '圖標',
...@@ -776,7 +778,8 @@ export default { ...@@ -776,7 +778,8 @@ export default {
edit_custom_table: '編輯自助數據集', edit_custom_table: '編輯自助數據集',
edit_field: '編輯自斷', edit_field: '編輯自斷',
preview_100_data: '顯示前100行數據', preview_100_data: '顯示前100行數據',
invalid_table_check: '非直連數據集請先完成數據同步' invalid_table_check: '非直連數據集請先完成數據同步',
parse_error: '解析錯誤'
}, },
datasource: { datasource: {
datasource: '數據源', datasource: '數據源',
......
...@@ -82,7 +82,9 @@ export default { ...@@ -82,7 +82,9 @@ export default {
thirdparty: '第三方登录', thirdparty: '第三方登录',
thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!', thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!',
expires: '登录token过期,请重新登录', expires: '登录token过期,请重新登录',
tokenError: 'token错误,请重新登录' tokenError: 'token错误,请重新登录',
username_error: '请输入正确的用户名',
password_error: '密码不小于6位'
}, },
commons: { commons: {
icon: '图标', icon: '图标',
...@@ -776,7 +778,8 @@ export default { ...@@ -776,7 +778,8 @@ export default {
edit_custom_table: '编辑自助数据集', edit_custom_table: '编辑自助数据集',
edit_field: '编辑字段', edit_field: '编辑字段',
preview_100_data: '显示前100行数据', preview_100_data: '显示前100行数据',
invalid_table_check: '非直连数据集请先完成数据同步' invalid_table_check: '非直连数据集请先完成数据同步',
parse_error: '解析错误'
}, },
datasource: { datasource: {
datasource: '数据源', datasource: '数据源',
......
...@@ -50,7 +50,11 @@ export default { ...@@ -50,7 +50,11 @@ export default {
background-color: #c92100; background-color: #c92100;
color: #fff; color: #fff;
text-align: center; text-align: center;
padding: 6px 11px; /* padding: 6px 11px; */
position: fixed;
z-index: 1002;
top: 0;
width: 100%;
} }
</style> </style>
...@@ -43,51 +43,23 @@ ...@@ -43,51 +43,23 @@
{{ name }}<i class="el-icon-arrow-down el-icon--right" /> {{ name }}<i class="el-icon-arrow-down el-icon--right" />
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<router-link to="/person-info/index"> <router-link to="/person-info/index">
<el-dropdown-item>{{ $t('commons.personal_info') }}</el-dropdown-item> <el-dropdown-item>{{ $t('commons.personal_info') }}</el-dropdown-item>
</router-link> </router-link>
<router-link to="/person-pwd/index"> <router-link to="/person-pwd/index">
<el-dropdown-item>{{ $t('user.reset_password') }}</el-dropdown-item> <el-dropdown-item>{{ $t('user.reset_password') }}</el-dropdown-item>
</router-link> </router-link>
<a href="https://panjiachen.github.io/vue-element-admin-site/#/" target="_blank"> <a href="https://panjiachen.github.io/vue-element-admin-site/#/" target="_blank">
<el-dropdown-item>{{ $t('commons.help_documentation') }} </el-dropdown-item> <el-dropdown-item>{{ $t('commons.help_documentation') }} </el-dropdown-item>
</a> </a>
<router-link to="/system/about">
<a href="https://fit2cloud.com/" target="_blank"> <el-dropdown-item>{{ $t('commons.about_us') }}</el-dropdown-item>
<el-dropdown-item>{{ $t('commons.about_us') }} </el-dropdown-item> </router-link>
</a>
<el-dropdown-item divided @click.native="logout"> <el-dropdown-item divided @click.native="logout">
<span style="display:block;">{{ $t('commons.exit_system') }}</span> <span style="display:block;">{{ $t('commons.exit_system') }}</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<!-- <el-dropdown class="avatar-container" trigger="click">
<div class="avatar-wrapper">
<div class="de-user-avatar">
<span>
{{ name }}
</span>
</div>
</div>
<el-dropdown-menu slot="dropdown" class="user-dropdown">
<router-link to="/">
<el-dropdown-item>Home</el-dropdown-item>
</router-link>
<a href="https://github.com/PanJiaChen/vue-admin-template/" target="_blank">
<el-dropdown-item>Github</el-dropdown-item>
</a>
<a href="https://panjiachen.github.io/vue-element-admin-site/#/" target="_blank">
<el-dropdown-item>Docs</el-dropdown-item>
</a>
<el-dropdown-item divided @click.native="logout">
<span style="display:block;">Log Out</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
</div> </div>
</div> </div>
</template> </template>
......
<template> <template>
<div :class="classObj" class="app-wrapper"> <div :class="classObj" class="app-wrapper">
<!-- <licbar /> --> <licbar />
<topbar /> <topbar />
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" /> <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar v-if="!sidebar.hide" class="sidebar-container" /> <sidebar v-if="!sidebar.hide" class="sidebar-container" />
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<script> <script>
import RightPanel from '@/components/RightPanel' import RightPanel from '@/components/RightPanel'
// import { Sidebar, Settings, AppMain, Topbar, Licbar } from './components' import { Sidebar, Settings, AppMain, Topbar, Licbar } from './components'
import { Sidebar, Settings, AppMain, Topbar } from './components' // import { Sidebar, Settings, AppMain, Topbar } from './components'
import ResizeMixin from './mixin/ResizeHandler' import ResizeMixin from './mixin/ResizeHandler'
export default { export default {
...@@ -29,8 +29,8 @@ export default { ...@@ -29,8 +29,8 @@ export default {
Sidebar, Sidebar,
Settings, Settings,
AppMain, AppMain,
Topbar Topbar,
// Licbar Licbar
}, },
mixins: [ResizeMixin], mixins: [ResizeMixin],
computed: { computed: {
......
...@@ -132,6 +132,11 @@ export default { ...@@ -132,6 +132,11 @@ export default {
}, },
uploadFail(response, file, fileList) { uploadFail(response, file, fileList) {
this.uploading = false this.uploading = false
this.$message({
type: 'error',
message: this.$t('dataset.parse_error'),
showClose: true
})
}, },
uploadSuccess(response, file, fileList) { uploadSuccess(response, file, fileList) {
// console.log(response) // console.log(response)
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div v-if="valid" class="auth-root-class"> <div v-if="valid" class="auth-root-class">
<span slot="footer"> <span slot="footer">
<el-button v-if="!form.enablePwd" v-clipboard:copy="form.uri" v-clipboard:success="onCopy" v-clipboard:error="onError" type="primary">复制链接</el-button> <el-button v-if="!form.enablePwd" v-clipboard:copy="form.uri" v-clipboard:success="onCopy" v-clipboard:error="onError" type="primary">复制链接</el-button>
<el-button v-if="form.enablePwd" v-clipboard:copy="form.uri + ' 密码: '+ form.pwd" v-clipboard:success="onCopy" v-clipboard:error="onError" type="primary">复制链接及密码</el-button> <el-button v-if="form.enablePwd" v-clipboard:copy="form.uri + ' 密码: '+ form.pwd" v-clipboard:success="onCopy" v-clipboard:error="onError" type="primary">复制链接及密码</el-button>
</span> </span>
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
<el-col :span="12"> <el-col :span="12">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" size="default"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" size="default">
<div class="login-logo"> <div class="login-logo">
<img v-if="!loginLogoUrl" src="@/assets/DataEase-black.png" alt=""> <img v-if="!loginLogoUrl" src="@/assets/DataEase-color.png" alt="">
<img v-else :src="loginLogoUrl" alt=""> <img v-else :src="loginLogoUrl" alt="">
</div> </div>
<div class="login-title"> <!-- <div class="login-title">-->
{{ uiInfo && uiInfo['ui.loginTitle'] && uiInfo['ui.loginTitle'].paramValue || $t('login.title') }} <!-- &lt;!&ndash; {{ uiInfo && uiInfo['ui.loginTitle'] && uiInfo['ui.loginTitle'].paramValue || $t('login.title') }}&ndash;&gt;-->
</div> <!-- </div>-->
<div class="login-border" /> <div class="login-border" />
<div class="login-welcome"> <div class="login-welcome">
{{ $t('login.welcome') + (uiInfo && uiInfo['ui.title'] && uiInfo['ui.title'].paramValue || 'DATAEASE') }} {{ $t('login.welcome') + (uiInfo && uiInfo['ui.title'] && uiInfo['ui.title'].paramValue || 'DATAEASE') }}
...@@ -64,10 +64,10 @@ export default { ...@@ -64,10 +64,10 @@ export default {
if (res.data) { if (res.data) {
callback() callback()
} else { } else {
callback(new Error('Please enter the correct user name')) callback(this.$t('login.username_error'))
} }
}).catch(() => { }).catch(() => {
callback(new Error('Please enter the correct user name')) callback(this.$t('login.username_error'))
}) })
// if (!validUsername(value)) { // if (!validUsername(value)) {
// callback(new Error('Please enter the correct user name')) // callback(new Error('Please enter the correct user name'))
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
} }
const validatePassword = (rule, value, callback) => { const validatePassword = (rule, value, callback) => {
if (value.length < 6) { if (value.length < 6) {
callback(new Error('The password can not be less than 6 digits')) callback(this.$t('login.password_error'))
} else { } else {
callback() callback()
} }
...@@ -178,8 +178,8 @@ export default { ...@@ -178,8 +178,8 @@ export default {
} }
.login-logo { .login-logo {
margin-top: 30px; margin-top: 50px;
margin-left: 30px; text-align: center;
@media only screen and (max-width: 1280px) { @media only screen and (max-width: 1280px) {
margin-top: 20px; margin-top: 20px;
} }
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
width: 80px; width: 80px;
background: $--color-primary; background: $--color-primary;
@media only screen and (max-width: 1280px) { @media only screen and (max-width: 1280px) {
margin: 10px auto 10px; margin: 20px auto 20px;
} }
} }
...@@ -225,11 +225,11 @@ export default { ...@@ -225,11 +225,11 @@ export default {
} }
.login-form { .login-form {
margin-top: 30px; margin-top: 40px;
padding: 0 40px; padding: 0 40px;
@media only screen and (max-width: 1280px) { @media only screen and (max-width: 1280px) {
margin-top: 10px; margin-top: 20px;
} }
& ::v-deep .el-input__inner { & ::v-deep .el-input__inner {
......
<template>
<layout-content>
<div>
<el-card class="box-card about-card">
<div slot="header" class="clearfix license-header">
<img src="@/assets/DataEase-white.png" alt="" style="height: 80px;width: 400px;padding-top: 15px;">
</div>
<div class="license-content">
<div v-if="license.status === 'Fail'">License 无效</div>
<div v-if="license.status !== 'Fail'">
<table>
<tr>
<th>授权给</th>
<td>{{ license.corporation }}</td>
</tr>
<tr>
<th>过期时间</th>
<td>
<label v-if="license.status === 'expired'" style="color: red">{{ license.expired }} (已过期)</label>
<label v-if="license.status === 'valid'">{{ license.expired }}</label>
</td>
</tr>
<tr>
<th>授权数量</th>
<td>{{ license.count }}</td>
</tr>
<tr>
<th>版本</th>
<td>
<span v-if="license.edition">
<span v-if="license.edition === 'Standard'">标准版</span>
<span v-if="license.edition === 'Enterprise'">企业版</span>
</span>
</td>
</tr>
<tr>
<th>版本号</th>
<td>
<span>{{ build }}</span>
</td>
</tr>
</table>
</div>
<div class="md-padding" />
<div layout="row" layout-align="space-between center" class="lic_rooter">
<el-upload
action=""
:multiple="false"
:show-file-list="false"
:file-list="fileList"
accept=".key"
name="file"
:before-upload="beforeUpload"
>
<a class="md-primary pointer">更新 License</a>
</el-upload>
<a class="md-primary pointer" @click="support">获取技术支持</a>
</div>
</div>
</el-card>
</div>
</layout-content>
</template>
<script>
import LayoutContent from '@/components/business/LayoutContent'
import { validate, buildVersion, updateInfo } from '@/api/system/about'
import { getToken } from '@/utils/auth'
export default {
components: { LayoutContent },
data() {
return {
license: {},
version: null,
build: null,
licenseKey: '',
fileList: [],
headers: { Authorization: getToken() }
}
},
created() {
this.initVersion()
this.getLicenseInfo()
},
methods: {
initVersion() {
buildVersion().then(res => {
this.build = res.data
})
},
getLicenseInfo() {
// validate({}).then(res => {
// this.license = this.getLicense(res.data)
// console.log(this.license)
// })
this.validateHandler({}, res => {
this.license = this.getLicense(res.data)
})
},
validateHandler(param, success) {
validate(param).then(success)
},
getLicense(result) {
return {
status: result.status,
corporation: result.license ? result.license.corporation : '',
expired: result.license ? result.license.expired : '',
count: result.license ? result.license.count : '',
version: result.license ? result.license.version : '',
edition: result.license ? result.license.edition : ''
}
},
importLic(file) {
const reader = new FileReader()
reader.onload = function(e) {
this.licenseKey = e.target.result
this.validateHandler({ license: this.licenseKey }, response => {
this.updateLicense = this.getLicense(response.data)
this.update()
})
}.bind(this)
reader.readAsText(file)
},
update() {
const param = { license: this.licenseKey }
updateInfo(param).then(response => {
if (response.data.status === 'valid') {
this.$success(this.$t('i18n_mc_update_success'))
this.license = this.getLicense(response.data)
} else {
this.$warning(response.data.message)
}
})
},
support() {
const url = 'https://support.fit2cloud.com/'
window.open(url, '_blank')
},
beforeUpload(file) {
// console.log(file)
this.importLic(file)
return false
}
}
}
</script>
<style lang="scss" scoped>
.about-card {
background: inherit;
margin-top: 5%;
flex-direction: row;
margin-left: 20%;
margin-right: 20%;
width: 640px;
height: 400px;
position: relative;
>>>div.el-card__header {
padding: 0;
}
}
.license-header {
height: 100px;
background-image: url('../../../assets/license_header.png');
text-align: center;
padding: 20px 0;
background-size: 100% 100%;
}
.license-content {
font-size: 16px;
padding: 50px;
>>>table {
width: 100%;
}
>>>th {
text-align: left;
width: 45%;
}
>>>td {
display: table-cell;
vertical-align: inherit;
}
}
.md-padding {
padding: 10px;
}
.lic_rooter {
flex-direction: row;
box-sizing: border-box;
display: flex;
align-items: center;
align-content: center;
max-width: 100%;
justify-content: space-between;
>>>a{
color: rgb(10,123,224);
cursor: pointer;
}
}
</style>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<svg-icon :icon-class="scope.row.icon ? scope.row.icon : ''" /> <svg-icon :icon-class="scope.row.icon ? scope.row.icon : ''" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" :label="$t('menu.create_time')" > <el-table-column prop="createTime" :label="$t('menu.create_time')">
<template v-slot:default="scope"> <template v-slot:default="scope">
<span>{{ scope.row.createTime | timestampFormatDate }}</span> <span>{{ scope.row.createTime | timestampFormatDate }}</span>
</template> </template>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<el-input v-model="form.title" :placeholder="$t('menu.button_name')" style="width: 179px;" /> <el-input v-model="form.title" :placeholder="$t('menu.button_name')" style="width: 179px;" />
</el-form-item> </el-form-item>
<el-form-item v-show="form.type !== 0" :label="$t('menu.authority_identification')" prop="permission"> <el-form-item v-show="form.type !== 0" :label="$t('menu.authority_identification')" prop="permission">
<el-input v-model="form.permission" :disabled="form.iframe || formType!=='add'" :placeholder="$t('menu.authority_identification')" style="width: 179px;" /> <el-input v-model="form.permission" :disabled="form.iframe || formType!=='add'" :placeholder="$t('menu.authority_identification')" style="width: 179px;" />
</el-form-item> </el-form-item>
<el-form-item v-if="form.type !== 2" label="$t('menu.route_addr')" prop="path"> <el-form-item v-if="form.type !== 2" label="$t('menu.route_addr')" prop="path">
<el-input v-model="form.path" :placeholder="$t('menu.route_addr')" :disabled="formType!=='add'" style="width: 179px;" /> <el-input v-model="form.path" :placeholder="$t('menu.route_addr')" :disabled="formType!=='add'" style="width: 179px;" />
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<el-input-number v-model.number="form.menuSort" :min="0" :max="999" controls-position="right" style="width: 179px;" /> <el-input-number v-model.number="form.menuSort" :min="0" :max="999" controls-position="right" style="width: 179px;" />
</el-form-item> </el-form-item>
<el-form-item v-show="!form.iframe && form.type === 1" :label="$t('menu.module_name')" prop="componentName"> <el-form-item v-show="!form.iframe && form.type === 1" :label="$t('menu.module_name')" prop="componentName">
<el-input v-model="form.componentName" :disabled="formType!=='add'" style="width: 179px;" :placeholder="匹配组件内Name字段" /> <el-input v-model="form.componentName" :disabled="formType!=='add'" style="width: 179px;" placeholder="匹配组件内Name字段" />
</el-form-item> </el-form-item>
<el-form-item v-show="!form.iframe && form.type === 1" label="$t('menu.path')" prop="component"> <el-form-item v-show="!form.iframe && form.type === 1" label="$t('menu.path')" prop="component">
<el-input v-model="form.component" :disabled="formType!=='add'" style="width: 179px;" :placeholder="$t('menu.path')" /> <el-input v-model="form.component" :disabled="formType!=='add'" style="width: 179px;" :placeholder="$t('menu.path')" />
......
...@@ -14,18 +14,18 @@ ...@@ -14,18 +14,18 @@
<!-- <fu-table-button v-permission="['user:add']" icon="el-icon-circle-plus-outline" :label="$t('user.create')" @click="create" /> --> <!-- <fu-table-button v-permission="['user:add']" icon="el-icon-circle-plus-outline" :label="$t('user.create')" @click="create" /> -->
</template> </template>
<el-table-column prop="username" :label="$t('commons.name')" /> <el-table-column prop="username" :label="$t('commons.name')" />
<el-table-column prop="nickName" :label="$t('commons.nick_name')" /> <el-table-column prop="nickName" :label="$t('commons.nick_name')" />
<el-table-column prop="gender" :label="$t('commons.gender')" /> <el-table-column prop="gender" :label="$t('commons.gender')" />
<el-table-column :show-overflow-tooltip="true" prop="phone" :label="$t('commons.phone')" /> <el-table-column :show-overflow-tooltip="true" prop="phone" :label="$t('commons.phone')" />
<el-table-column :show-overflow-tooltip="true" prop="email" :label="$t('commons.email')" /> <el-table-column :show-overflow-tooltip="true" prop="email" :label="$t('commons.email')" />
<el-table-column :show-overflow-tooltip="true" prop="dept" :label="$t('commons.organization')"> <el-table-column :show-overflow-tooltip="true" prop="dept" :label="$t('commons.organization')">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row.dept.deptName }}</div> <div>{{ scope.row.dept && scope.row.dept.deptName }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" :label="$t('commons.status')" > <el-table-column prop="status" :label="$t('commons.status')">
<template v-slot:default="scope"> <template v-slot:default="scope">
<el-switch v-model="scope.row.enabled" :active-value="1" :inactive-value="0" inactive-color="#DCDFE6" @change="changeSwitch(scope.row)" /> <el-switch v-model="scope.row.enabled" :active-value="1" :inactive-value="0" inactive-color="#DCDFE6" @change="changeSwitch(scope.row)" />
</template> </template>
...@@ -64,11 +64,11 @@ ...@@ -64,11 +64,11 @@
<el-form-item :label="$t('commons.gender')"> <el-form-item :label="$t('commons.gender')">
<el-radio-group v-model="form.gender" style="width: 178px"> <el-radio-group v-model="form.gender" style="width: 178px">
<el-radio :label="$t('commons.man')">{{ $t('commons.man') }}</el-radio> <el-radio :label="$t('commons.man')">{{ $t('commons.man') }}</el-radio>
<el-radio :label="$t('commons.woman')">{{ $t('commons.woman') }}</el-radio> <el-radio :label="$t('commons.woman')">{{ $t('commons.woman') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('commons.status')" > <el-form-item :label="$t('commons.status')">
<el-radio-group v-model="form.enabled" style="width: 140px"> <el-radio-group v-model="form.enabled" style="width: 140px">
<el-radio :label="1">{{ $t('commons.enable') }} </el-radio> <el-radio :label="1">{{ $t('commons.enable') }} </el-radio>
<el-radio :label="0"> {{ $t('commons.disable') }} </el-radio> <el-radio :label="0"> {{ $t('commons.disable') }} </el-radio>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论