[Improvement][ui]List vacancy optimization and icon icon repair (#4286)

* [Improvement][ui] List vacancy optimization and icon icon repair
This commit is contained in:
break60 2020-12-23 09:39:33 +08:00 committed by GitHub
parent 140679e337
commit e24e690c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 82 additions and 13 deletions

View File

@ -28,6 +28,7 @@ import i18n from '@/module/i18n'
import { sync } from 'vuex-router-sync'
import Chart from '@/module/ana-charts'
import '@/module/filter/formatDate'
import '@/module/filter/filterNull'
import themeData from '@/module/echarts/themeData.json'
import Permissions from '@/module/permissions'
import 'sass/conf/home/index.scss'

View File

@ -150,7 +150,7 @@ const tasksState = {
id: 0,
desc: `${i18n.$t('Submitted successfully')}`,
color: '#A9A9A9',
icoUnicode: 'fa-dot-circle-o',
icoUnicode: 'fa fa-dot-circle-o',
isSpin: false
},
RUNNING_EXECUTION: {

View File

@ -32,7 +32,6 @@
</div>
</template>
</el-table-column>
<el-table-column prop="description" :label="$t('Description')" width="200"></el-table-column>
<el-table-column :label="$t('Create Time')" min-width="120">
<template slot-scope="scope">
<span>{{scope.row.createTime | formatDate}}</span>

View File

@ -47,7 +47,11 @@
<span>{{scope.row.updateTime | formatDate}}</span>
</template>
</el-table-column>
<el-table-column prop="description" :label="$t('Description')"></el-table-column>
<el-table-column :label="$t('Description')">
<template slot-scope="scope">
<span>{{scope.row.description | filterNull}}</span>
</template>
</el-table-column>
<el-table-column prop="modifyBy" :label="$t('Modify User')"></el-table-column>
<el-table-column :label="$t('Timing state')">
<template slot-scope="scope">

View File

@ -32,7 +32,11 @@
<el-table-column prop="userName" :label="$t('Owned Users')"></el-table-column>
<el-table-column prop="defCount" :label="$t('Process Define Count')"></el-table-column>
<el-table-column prop="instRunningCount" :label="$t('Process Instance Running Count')"></el-table-column>
<el-table-column prop="description" :label="$t('Description')" width="200"></el-table-column>
<el-table-column :label="$t('Description')" width="200">
<template slot-scope="scope">
<span>{{scope.row.description | filterNull}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Create Time')" min-width="120">
<template slot-scope="scope">
<span>{{scope.row.createTime | formatDate}}</span>

View File

@ -35,7 +35,11 @@
</template>
</el-table-column>
<el-table-column prop="fileName" :label="$t('File Name')"></el-table-column>
<el-table-column prop="description" :label="$t('Description')" width="200"></el-table-column>
<el-table-column :label="$t('Description')" width="200">
<template slot-scope="scope">
<span>{{scope.row.description | filterNull}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Size')">
<template slot-scope="scope">
{{_rtSize(scope.row.size)}}

View File

@ -35,7 +35,11 @@
</template>
</el-table-column>
<el-table-column prop="fileName" :label="$t('File Name')"></el-table-column>
<el-table-column prop="description" :label="$t('Description')" width="200"></el-table-column>
<el-table-column :label="$t('Description')" width="200">
<template slot-scope="scope">
<span>{{scope.row.description | filterNull}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Size')">
<template slot-scope="scope">
{{_rtSize(scope.row.size)}}

View File

@ -31,7 +31,11 @@
</el-table-column>
<el-table-column prop="className" :label="$t('Class Name')" min-width="120"></el-table-column>
<el-table-column prop="type" :label="$t('type')"></el-table-column>
<el-table-column prop="description" :label="$t('Description')" min-width="150"></el-table-column>
<el-table-column :label="$t('Description')" min-width="150">
<template slot-scope="scope">
<span>{{scope.row.description | filterNull}}</span>
</template>
</el-table-column>
<el-table-column prop="resourceName" :label="$t('Jar Package')" min-width="150"></el-table-column>
<el-table-column :label="$t('Update Time')" min-width="120">
<template slot-scope="scope">

View File

@ -40,7 +40,11 @@
{{_rtSize(scope.row.size)}}
</template>
</el-table-column>
<el-table-column prop="description" :label="$t('Description')" width="200"></el-table-column>
<el-table-column :label="$t('Description')" width="200">
<template slot-scope="scope">
<span>{{scope.row.description | filterNull}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Create Time')" min-width="120">
<template slot-scope="scope">
<span>{{scope.row.createTime | formatDate}}</span>

View File

@ -20,8 +20,11 @@
<el-table :data="list" size="mini" style="width: 100%">
<el-table-column type="index" :label="$t('#')" width="50"></el-table-column>
<el-table-column prop="tenantCode" :label="$t('Tenant Code')" min-width="100"></el-table-column>
<el-table-column prop="tenantName" :label="$t('Tenant Name')" min-width="100"></el-table-column>
<el-table-column prop="description" :label="$t('Description')" min-width="100"></el-table-column>
<el-table-column :label="$t('Description')" min-width="100">
<template slot-scope="scope">
<span>{{scope.row.description | filterNull}}</span>
</template>
</el-table-column>
<el-table-column prop="queueName" :label="$t('Queue')" min-width="80"></el-table-column>
<el-table-column :label="$t('Create Time')" min-width="120">
<template slot-scope="scope">

View File

@ -28,7 +28,11 @@
<el-table-column prop="tenantCode" :label="$t('Tenant')" min-width="120"></el-table-column>
<el-table-column prop="queue" :label="$t('Queue')" width="90"></el-table-column>
<el-table-column prop="email" :label="$t('Email')" min-width="200"></el-table-column>
<el-table-column prop="phone" :label="$t('Phone')" width="100"></el-table-column>
<el-table-column prop="phone" :label="$t('Phone')" width="100">
<template slot-scope="scope">
<span>{{scope.row.phone | filterNull}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('State')" width="60">
<template slot-scope="scope">
{{scope.row.state === 1 ? `${$t('Enable')}` : `${$t('Disable')}`}}

View File

@ -22,9 +22,23 @@ import dayjs from 'dayjs'
*/
const formatDate = (value, fmt) => {
fmt = fmt || 'YYYY-MM-DD HH:mm:ss'
return dayjs(value).format(fmt)
if (value === null) {
return '-'
} else {
return dayjs(value).format(fmt)
}
}
/**
* filter null
*/
const filterNull = (value) => {
if (value === null || value === '') {
return '-'
} else {
return value
}
}
export {
formatDate
formatDate, filterNull
}

View File

@ -0,0 +1,24 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Vue from 'vue'
import { filterNull } from './filter'
/**
* @param {String} fmt optional, define filter null
*/
Vue.filter('filterNull', filterNull)