Commit b0c984bc authored by huai.li's avatar huai.li

列表无内容,增加提示

parent 3f492583
const type = 'setting'
const setting = {
getSettingIndex: {
url: '/vue/setting/index'
}
}
function temp (t, tt) {
let endStr = tt === '' ? `${t}` : `${t}-${tt}`
return {
......@@ -48,6 +53,7 @@ function term (t, tt, num) {
}
export default {
...setting,
...temp('implement', 'type'),
...temp('implement', 'method'),
...temp('service', 'type'),
......
......@@ -16,6 +16,7 @@
@update:clientList="form =>{ updateForm(form) }">
</search-form>
<div class="page-body-content">
<NoList v-if="result.list.length === 0"/>
<Item
v-for="item in result.list"
:item="item"
......@@ -64,6 +65,7 @@ import Pagenation from './accountPagenation'
import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams'
import singleRadioTool from '../common/singleRadioTool'
import NoList from '../common/noList.vue'
import {
requestAPI,
api
......@@ -80,7 +82,8 @@ export default {
FormModal,
LeaveMessage,
Pagenation,
singleRadioTool
singleRadioTool,
NoList
},
directives: {
......
......@@ -29,6 +29,7 @@
<!-- <el-radio-button key="all" label="all" value="全部">全部</el-radio-button> -->
</singleRadioTool>
</div>
<NoList v-if="result.list.length === 0"/>
<Item
v-for="item in result.list"
:item="item"
......@@ -107,6 +108,7 @@ import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams'
import TimeSearchForm from './timeSearchForm'
import singleRadioTool from '../common/singleRadioTool'
import NoList from '../common/noList.vue'
import {
requestAPI,
api
......@@ -124,7 +126,8 @@ export default {
LeaveMessage,
Pagenation,
TimeSearchForm,
singleRadioTool
singleRadioTool,
NoList
},
directives: {
......
<template>
<div>
未查询到数据!
</div>
</template>
<style scoped="">
div {
background-color: white;
height: 50px;
line-height: 50px;
padding-left: 10px;
margin-bottom: 10px;
}
</style>
......@@ -16,6 +16,7 @@
@update:clientList="form =>{ updateForm(form) }">
</search-form>
<div class="page-body-content leaveMessage">
<NoList v-if="result.list.length === 0"/>
<Item
v-for="item in result.list"
:item="item"
......@@ -77,6 +78,7 @@ import FormModal from '../document/documentModal'
import Pagenation from './documentPagenation'
import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams'
import NoList from '../common/noList.vue'
import {
requestAPI,
api
......@@ -91,7 +93,8 @@ export default {
SearchForm,
Item,
FormModal,
Pagenation
Pagenation,
NoList
},
directives: {
......
......@@ -20,6 +20,7 @@
:list="result.countList">
</countArr>
</div>
<NoList v-if="result.list.length === 0"/>
<Item
v-for="item in result.list"
:item="item"
......@@ -69,6 +70,7 @@ import singleRadioTool from '../common/singleRadioTool'
import countArr from './countArr'
import editModal from '../punch/editModal'
import clickOutside from '@/lib/bind'
import NoList from '../common/noList.vue'
import {
requestAPI,
api
......@@ -85,7 +87,8 @@ export default {
Pagenation,
singleRadioTool,
countArr,
editModal
editModal,
NoList
},
directives: {
......
......@@ -33,6 +33,7 @@
:list="result.countArr">
</countArr>
</div>
<NoList v-if="result.list.length === 0"/>
<ReimItem
v-for="item in result.list"
:item="item"
......@@ -73,6 +74,7 @@ import Pagenation from './reimbursementPagenation'
import clickOutside from '@/lib/bind'
import singleRadioTool from '../common/singleRadioTool'
import SetParams from '../common/setParams'
import NoList from '../common/noList.vue'
import {
requestAPI,
api
......@@ -90,7 +92,8 @@ export default {
CountArr,
Pagenation,
singleRadioTool,
TimeSearchForm
TimeSearchForm,
NoList
},
directives: {
......
......@@ -16,6 +16,7 @@
@update:clientList="form =>{ updateForm(form) }">
</search-form>
<div class="page-body-content leaveMessage">
<NoList v-if="result.list.length === 0"/>
<ScheduleItem
v-for="item in result.list"
:item="item"
......@@ -58,6 +59,7 @@ import Pagenation from './schedulePagenation'
import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams'
import ReportModal from '../schedule/reportModal'
import NoList from '../common/noList.vue'
import {
requestAPI,
api
......@@ -74,7 +76,8 @@ export default {
ScheduleModal,
LeaveMessage,
Pagenation,
ReportModal
ReportModal,
NoList
},
directives: {
......
......@@ -16,6 +16,7 @@
@update:clientList="form =>{ updateForm(form) }">
</search-form>
<div class="page-body-content">
<NoList v-if="result.list.length === 0"/>
<Item :list="result.list">
</Item>
<Pagenation
......@@ -36,6 +37,7 @@ import FormModal from '../service/serviceModal'
import Pagenation from './servicePagenation'
import SetParams from '../common/setParams'
import singleRadioTool from '../common/singleRadioTool'
import NoList from '../common/noList.vue'
import {
requestAPI,
api
......@@ -51,7 +53,8 @@ export default {
Item,
FormModal,
Pagenation,
singleRadioTool
singleRadioTool,
NoList
},
data () {
......
......@@ -25,6 +25,10 @@
<script>
import SearchHeader from '../common/searchHeader'
import Group from './group'
import {
requestAPI,
api
} from '@/lib/commonMixin'
// import H from 'highcharts'
export default {
name: 'settingIndex',
......@@ -43,107 +47,122 @@ export default {
},
mounted () {
/* eslint-disable */
Highcharts.setOptions({
chart: {
type: 'solidgauge'
},
title: null,
pane: {
center: ['50%', '85%'],
size: '140%',
startAngle: -90,
endAngle: 90,
background: {
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
innerRadius: '60%',
outerRadius: '100%',
shape: 'arc'
}
},
tooltip: {
enabled: false
},
yAxis: {
stops: [
[0.1, '#55BF3B'], // green
[0.5, '#DDDF0D'], // yellow
[0.9, '#DF5353'] // red
],
lineWidth: 0,
minorTickInterval: null,
tickWidth: 2,
title: {
y: -70
this.getSettingIndex()
},
methods: {
getSettingIndex () {
requestAPI(api.getSettingIndex, {})
.then(res => {
return res
}).then(res => {
this.init(res)
})
},
init (res) {
/* eslint-disable */
Highcharts.setOptions({
chart: {
type: 'solidgauge'
},
labels: {
y: 16
}
},
plotOptions: {
solidgauge: {
dataLabels: {
y: 5,
borderWidth: 0,
useHTML: true
title: null,
pane: {
center: ['50%', '85%'],
size: '140%',
startAngle: -90,
endAngle: 90,
background: {
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
innerRadius: '60%',
outerRadius: '100%',
shape: 'arc'
}
}
}
})
let chart1 = Highcharts.chart('container-speed', {
yAxis: {
min: 0,
max: 50,
title: {
text: '账户注册使用情况',
style: {
"font-weight": "bold"
},
y: -100
}
},
credits: {
enabled: false
},
series: [{
name: '已注册账户数',
data: [35],
dataLabels: {
format: '<span style="color: #666666;fill: #666666;">已注册账户数</span></div><br/>' +
'<div style="text-align:center"><span style="font-size:25px;color:' +
((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><span style="font-size:12px;color:silver">个</span><br/>'
},
tooltip: {
valueSuffix: '个'
}
}]
})
// 转速仪表
let chart2 = Highcharts.chart('container-rpm', {
yAxis: {
min: 0,
max: 800,
title: {
text: '账户有效期',
style: {
"font-weight": "bold"
enabled: false
},
yAxis: {
stops: [
[0.1, '#55BF3B'], // green
[0.5, '#DDDF0D'], // yellow
[0.9, '#DF5353'] // red
],
lineWidth: 0,
minorTickInterval: null,
tickWidth: 2,
title: {
y: -70
},
y: -100
}
},
series: [{
name: 'RPM',
data: [500],
dataLabels: {
format: '<span style="color: #666666;fill: #666666;">剩余天数</span></div><br/>' +
'<div style="text-align:center"><span style="font-size:25px;color:' +
((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><span style="font-size:12px;color:silver">天</span><br/>'
labels: {
y: 16
}
},
tooltip: {
valueSuffix: '天'
plotOptions: {
solidgauge: {
dataLabels: {
y: 5,
borderWidth: 0,
useHTML: true
}
}
}
}]
})
})
let chart1 = Highcharts.chart('container-speed', {
yAxis: {
min: 0,
max: res.account.limitation,
title: {
text: '账户注册使用情况',
style: {
"font-weight": "bold"
},
y: -100
}
},
credits: {
enabled: false
},
series: [{
name: '已注册账户数',
data: [res.account.used],
dataLabels: {
format: '<span style="color: #666666;fill: #666666;">已注册账户数</span></div><br/>' +
'<div style="text-align:center"><span style="font-size:25px;color:' +
((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><span style="font-size:12px;color:silver">个</span><br/>'
},
tooltip: {
valueSuffix: '个'
}
}]
})
// 转速仪表
let chart2 = Highcharts.chart('container-rpm', {
yAxis: {
min: 0,
max: Number(res.expiry.duration),
title: {
text: '账户有效期',
style: {
"font-weight": "bold"
},
y: -100
}
},
series: [{
name: 'RPM',
data: [Number(res.expiry.remain)],
dataLabels: {
format: '<span style="color: #666666;fill: #666666;">剩余天数</span></div><br/>' +
'<div style="text-align:center"><span style="font-size:25px;color:' +
((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y}</span><span style="font-size:12px;color:silver">天</span><br/>'
},
tooltip: {
valueSuffix: '天'
}
}]
})
}
}
}
</script>
......
......@@ -124,12 +124,12 @@
},
{
name: '商机来源',
path: '/setting/taxonomy?term=10',
path: '/setting/taxonomy/term/10',
icon: 'fa fa-fw fa-map-pin'
},
{
name: '销售预测',
path: '/setting/taxonomy?term=13',
path: '/setting/taxonomy/term/13',
icon: 'fa fa-fw fa-signal'
},
{
......
<template>
<section>
<div class="content">
<search-header
ref="searchHeader"
:title="'客户导入'"
:add-title="'客户导入'"
@update:headerAdd="() => add()"
@update:headerClear="() => searchClear()">
</search-header>
<div class="page-body-content">
<el-alert title="" type="info">
<BreadCrumb name="用户角色"></BreadCrumb>
</el-alert>
<el-table :data="result.list" border stripe style="width: 100%;margin-top:20px;">
<el-table-column align="center" label="原文件名">
<template slot-scope="scope">
{{ scope.row.display_name}}
</template>
</el-table-column>
<el-table-column prop="description" align="center" label="导入信息">
</el-table-column>
<el-table-column prop="updated_at" align="center" label="状态">
</el-table-column>
<el-table-column prop="updated_at" align="center" label="全部条数">
</el-table-column>
<el-table-column prop="updated_at" align="center" label="成功条数">
</el-table-column>
<el-table-column prop="updated_at" align="center" label="失败条数">
</el-table-column>
<el-table-column prop="updated_at" align="center" label="录入人">
</el-table-column>
<el-table-column prop="updated_at" align="center" label="创建时间">
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click.prevent.stop="editEvent(scope.row)" :disabled="!scope.row.can_update"><i class="fa fa-edit animated"></i>编辑</el-button>
<el-button type="primary" size="mini" @click.prevent.stop="deleteEvent(scope.row.id)" :disabled="!scope.row.can_delete"><i class="fa fa-trash-o animated-hove"></i>删除</el-button>
</template>
</el-table-column>
</el-table>
<Pagenation
@update:pager="pager => {updatePage(pager)}"
:total="result.pagenation.totalcount">
</Pagenation>
</div>
</div>
<FormModal ref="formModal" :t="t" :tt="tt"></FormModal>
</section>
</template>
<script>
import SearchHeader from '../../common/searchHeader'
import BreadCrumb from '../BreadCrumb'
import FormModal from './modal'
import Pagenation from '../pagenation'
import {
requestAPI,
api
} from '@/lib/commonMixin'
export default {
name: 'implement_type_list',
components: {
SearchHeader,
BreadCrumb,
Pagenation,
FormModal
},
data () {
return {
t: 'role',
tt: '',
pagenation: {
thispage: 1,
pagesize: 20
},
result: {
list: [],
pagenation: {
totalcount: 1,
thispage: 1,
pagesize: 20
}
}
}
},
created () {
this.getList()
},
methods: {
getList (params) {
requestAPI(api[`getList${this.t}${this.tt}`], params)
.then((res) => {
this.result.list = res.list
this.result.pagenation = res.pagenation
})
},
updatePage (pager) {
let ret = Object.assign({
page: this.pagenation.thispage
}, {page: pager.thispage})
this.getList(ret)
},
_reload () {
this.getList({page: this.pagenation.thispage})
},
// 6.1新增
add () {
this.$refs.formModal.show()
},
// 6.2编辑
editEvent (item) {
this.$refs.formModal.show(item)
},
deleteEvent (id) {
let deleteTip = '删除'
this.$confirm(`${deleteTip}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestAPI(api[`delete${this.t}${this.tt}`], { id })
.then((res) => {
this.$message.success(`${deleteTip}成功`)
this._reload()
})
}).catch(() => {
this.$message.info(`取消${deleteTip}`)
})
},
searchClear () {}
}
}
</script>
<style scoped>
</style>
......@@ -16,6 +16,7 @@
@update:clientList="form =>{ updateForm(form) }">
</search-form>
<div class="page-body-content">
<NoList v-if="result.list.length === 0"/>
<Item
v-for="item in result.list"
:item="item"
......@@ -71,6 +72,7 @@ import Pagenation from './supplierPagenation'
import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams'
import singleRadioTool from '../common/singleRadioTool'
import NoList from '../common/noList.vue'
import {
requestAPI,
api
......@@ -86,7 +88,8 @@ export default {
Item,
FormModal,
Pagenation,
singleRadioTool
singleRadioTool,
NoList
},
directives: {
......
......@@ -31,6 +31,7 @@
@update:item="val => { reimTypeChange(val) }">
</singleRadioTool>
</div>
<NoList v-if="result.list.length === 0"/>
<GroupItem
v-for="item in result.list"
:item="item"
......@@ -71,6 +72,7 @@ import Pagenation from './groupPagenation'
import clickOutside from '@/lib/bind'
import singleRadioTool from '../common/singleRadioTool'
import SetParams from '../common/setParams'
import NoList from '../common/noList.vue'
import {
requestAPI,
api
......@@ -86,7 +88,8 @@ export default {
GroupItem,
TaskGroupModal,
Pagenation,
singleRadioTool
singleRadioTool,
NoList
},
directives: {
......
......@@ -22,6 +22,7 @@
@update:item="val => { reimTypeChange(val) }">
</singleRadioTool>
</div>
<NoList v-if="result.list.length === 0"/>
<TaskItem
v-for="item in result.list"
:item="item"
......@@ -60,6 +61,7 @@ import Pagenation from './taskPagenation'
import clickOutside from '@/lib/bind'
import singleRadioTool from '../common/singleRadioTool'
import SetParams from '../common/setParams'
import NoList from '../common/noList.vue'
import {
requestAPI,
api
......@@ -75,7 +77,8 @@ export default {
TaskItem,
TaskModal,
Pagenation,
singleRadioTool
singleRadioTool,
NoList
},
directives: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment