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

列表无内容,增加提示

parent 3f492583
const type = 'setting' const type = 'setting'
const setting = {
getSettingIndex: {
url: '/vue/setting/index'
}
}
function temp (t, tt) { function temp (t, tt) {
let endStr = tt === '' ? `${t}` : `${t}-${tt}` let endStr = tt === '' ? `${t}` : `${t}-${tt}`
return { return {
...@@ -48,6 +53,7 @@ function term (t, tt, num) { ...@@ -48,6 +53,7 @@ function term (t, tt, num) {
} }
export default { export default {
...setting,
...temp('implement', 'type'), ...temp('implement', 'type'),
...temp('implement', 'method'), ...temp('implement', 'method'),
...temp('service', 'type'), ...temp('service', 'type'),
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
@update:clientList="form =>{ updateForm(form) }"> @update:clientList="form =>{ updateForm(form) }">
</search-form> </search-form>
<div class="page-body-content"> <div class="page-body-content">
<NoList v-if="result.list.length === 0"/>
<Item <Item
v-for="item in result.list" v-for="item in result.list"
:item="item" :item="item"
...@@ -64,6 +65,7 @@ import Pagenation from './accountPagenation' ...@@ -64,6 +65,7 @@ import Pagenation from './accountPagenation'
import clickOutside from '@/lib/bind' import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams' import SetParams from '../common/setParams'
import singleRadioTool from '../common/singleRadioTool' import singleRadioTool from '../common/singleRadioTool'
import NoList from '../common/noList.vue'
import { import {
requestAPI, requestAPI,
api api
...@@ -80,7 +82,8 @@ export default { ...@@ -80,7 +82,8 @@ export default {
FormModal, FormModal,
LeaveMessage, LeaveMessage,
Pagenation, Pagenation,
singleRadioTool singleRadioTool,
NoList
}, },
directives: { directives: {
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<!-- <el-radio-button key="all" label="all" value="全部">全部</el-radio-button> --> <!-- <el-radio-button key="all" label="all" value="全部">全部</el-radio-button> -->
</singleRadioTool> </singleRadioTool>
</div> </div>
<NoList v-if="result.list.length === 0"/>
<Item <Item
v-for="item in result.list" v-for="item in result.list"
:item="item" :item="item"
...@@ -107,6 +108,7 @@ import clickOutside from '@/lib/bind' ...@@ -107,6 +108,7 @@ import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams' import SetParams from '../common/setParams'
import TimeSearchForm from './timeSearchForm' import TimeSearchForm from './timeSearchForm'
import singleRadioTool from '../common/singleRadioTool' import singleRadioTool from '../common/singleRadioTool'
import NoList from '../common/noList.vue'
import { import {
requestAPI, requestAPI,
api api
...@@ -124,7 +126,8 @@ export default { ...@@ -124,7 +126,8 @@ export default {
LeaveMessage, LeaveMessage,
Pagenation, Pagenation,
TimeSearchForm, TimeSearchForm,
singleRadioTool singleRadioTool,
NoList
}, },
directives: { 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 @@ ...@@ -16,6 +16,7 @@
@update:clientList="form =>{ updateForm(form) }"> @update:clientList="form =>{ updateForm(form) }">
</search-form> </search-form>
<div class="page-body-content leaveMessage"> <div class="page-body-content leaveMessage">
<NoList v-if="result.list.length === 0"/>
<Item <Item
v-for="item in result.list" v-for="item in result.list"
:item="item" :item="item"
...@@ -77,6 +78,7 @@ import FormModal from '../document/documentModal' ...@@ -77,6 +78,7 @@ import FormModal from '../document/documentModal'
import Pagenation from './documentPagenation' import Pagenation from './documentPagenation'
import clickOutside from '@/lib/bind' import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams' import SetParams from '../common/setParams'
import NoList from '../common/noList.vue'
import { import {
requestAPI, requestAPI,
api api
...@@ -91,7 +93,8 @@ export default { ...@@ -91,7 +93,8 @@ export default {
SearchForm, SearchForm,
Item, Item,
FormModal, FormModal,
Pagenation Pagenation,
NoList
}, },
directives: { directives: {
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
:list="result.countList"> :list="result.countList">
</countArr> </countArr>
</div> </div>
<NoList v-if="result.list.length === 0"/>
<Item <Item
v-for="item in result.list" v-for="item in result.list"
:item="item" :item="item"
...@@ -69,6 +70,7 @@ import singleRadioTool from '../common/singleRadioTool' ...@@ -69,6 +70,7 @@ import singleRadioTool from '../common/singleRadioTool'
import countArr from './countArr' import countArr from './countArr'
import editModal from '../punch/editModal' import editModal from '../punch/editModal'
import clickOutside from '@/lib/bind' import clickOutside from '@/lib/bind'
import NoList from '../common/noList.vue'
import { import {
requestAPI, requestAPI,
api api
...@@ -85,7 +87,8 @@ export default { ...@@ -85,7 +87,8 @@ export default {
Pagenation, Pagenation,
singleRadioTool, singleRadioTool,
countArr, countArr,
editModal editModal,
NoList
}, },
directives: { directives: {
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
:list="result.countArr"> :list="result.countArr">
</countArr> </countArr>
</div> </div>
<NoList v-if="result.list.length === 0"/>
<ReimItem <ReimItem
v-for="item in result.list" v-for="item in result.list"
:item="item" :item="item"
...@@ -73,6 +74,7 @@ import Pagenation from './reimbursementPagenation' ...@@ -73,6 +74,7 @@ import Pagenation from './reimbursementPagenation'
import clickOutside from '@/lib/bind' import clickOutside from '@/lib/bind'
import singleRadioTool from '../common/singleRadioTool' import singleRadioTool from '../common/singleRadioTool'
import SetParams from '../common/setParams' import SetParams from '../common/setParams'
import NoList from '../common/noList.vue'
import { import {
requestAPI, requestAPI,
api api
...@@ -90,7 +92,8 @@ export default { ...@@ -90,7 +92,8 @@ export default {
CountArr, CountArr,
Pagenation, Pagenation,
singleRadioTool, singleRadioTool,
TimeSearchForm TimeSearchForm,
NoList
}, },
directives: { directives: {
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
@update:clientList="form =>{ updateForm(form) }"> @update:clientList="form =>{ updateForm(form) }">
</search-form> </search-form>
<div class="page-body-content leaveMessage"> <div class="page-body-content leaveMessage">
<NoList v-if="result.list.length === 0"/>
<ScheduleItem <ScheduleItem
v-for="item in result.list" v-for="item in result.list"
:item="item" :item="item"
...@@ -58,6 +59,7 @@ import Pagenation from './schedulePagenation' ...@@ -58,6 +59,7 @@ import Pagenation from './schedulePagenation'
import clickOutside from '@/lib/bind' import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams' import SetParams from '../common/setParams'
import ReportModal from '../schedule/reportModal' import ReportModal from '../schedule/reportModal'
import NoList from '../common/noList.vue'
import { import {
requestAPI, requestAPI,
api api
...@@ -74,7 +76,8 @@ export default { ...@@ -74,7 +76,8 @@ export default {
ScheduleModal, ScheduleModal,
LeaveMessage, LeaveMessage,
Pagenation, Pagenation,
ReportModal ReportModal,
NoList
}, },
directives: { directives: {
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
@update:clientList="form =>{ updateForm(form) }"> @update:clientList="form =>{ updateForm(form) }">
</search-form> </search-form>
<div class="page-body-content"> <div class="page-body-content">
<NoList v-if="result.list.length === 0"/>
<Item :list="result.list"> <Item :list="result.list">
</Item> </Item>
<Pagenation <Pagenation
...@@ -36,6 +37,7 @@ import FormModal from '../service/serviceModal' ...@@ -36,6 +37,7 @@ import FormModal from '../service/serviceModal'
import Pagenation from './servicePagenation' import Pagenation from './servicePagenation'
import SetParams from '../common/setParams' import SetParams from '../common/setParams'
import singleRadioTool from '../common/singleRadioTool' import singleRadioTool from '../common/singleRadioTool'
import NoList from '../common/noList.vue'
import { import {
requestAPI, requestAPI,
api api
...@@ -51,7 +53,8 @@ export default { ...@@ -51,7 +53,8 @@ export default {
Item, Item,
FormModal, FormModal,
Pagenation, Pagenation,
singleRadioTool singleRadioTool,
NoList
}, },
data () { data () {
......
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
<script> <script>
import SearchHeader from '../common/searchHeader' import SearchHeader from '../common/searchHeader'
import Group from './group' import Group from './group'
import {
requestAPI,
api
} from '@/lib/commonMixin'
// import H from 'highcharts' // import H from 'highcharts'
export default { export default {
name: 'settingIndex', name: 'settingIndex',
...@@ -43,6 +47,20 @@ export default { ...@@ -43,6 +47,20 @@ export default {
}, },
mounted () { mounted () {
this.getSettingIndex()
},
methods: {
getSettingIndex () {
requestAPI(api.getSettingIndex, {})
.then(res => {
return res
}).then(res => {
this.init(res)
})
},
init (res) {
/* eslint-disable */ /* eslint-disable */
Highcharts.setOptions({ Highcharts.setOptions({
chart: { chart: {
...@@ -93,7 +111,7 @@ export default { ...@@ -93,7 +111,7 @@ export default {
let chart1 = Highcharts.chart('container-speed', { let chart1 = Highcharts.chart('container-speed', {
yAxis: { yAxis: {
min: 0, min: 0,
max: 50, max: res.account.limitation,
title: { title: {
text: '账户注册使用情况', text: '账户注册使用情况',
style: { style: {
...@@ -107,7 +125,7 @@ export default { ...@@ -107,7 +125,7 @@ export default {
}, },
series: [{ series: [{
name: '已注册账户数', name: '已注册账户数',
data: [35], data: [res.account.used],
dataLabels: { dataLabels: {
format: '<span style="color: #666666;fill: #666666;">已注册账户数</span></div><br/>' + format: '<span style="color: #666666;fill: #666666;">已注册账户数</span></div><br/>' +
'<div style="text-align:center"><span style="font-size:25px;color:' + '<div style="text-align:center"><span style="font-size:25px;color:' +
...@@ -122,7 +140,7 @@ export default { ...@@ -122,7 +140,7 @@ export default {
let chart2 = Highcharts.chart('container-rpm', { let chart2 = Highcharts.chart('container-rpm', {
yAxis: { yAxis: {
min: 0, min: 0,
max: 800, max: Number(res.expiry.duration),
title: { title: {
text: '账户有效期', text: '账户有效期',
style: { style: {
...@@ -133,7 +151,7 @@ export default { ...@@ -133,7 +151,7 @@ export default {
}, },
series: [{ series: [{
name: 'RPM', name: 'RPM',
data: [500], data: [Number(res.expiry.remain)],
dataLabels: { dataLabels: {
format: '<span style="color: #666666;fill: #666666;">剩余天数</span></div><br/>' + format: '<span style="color: #666666;fill: #666666;">剩余天数</span></div><br/>' +
'<div style="text-align:center"><span style="font-size:25px;color:' + '<div style="text-align:center"><span style="font-size:25px;color:' +
...@@ -145,6 +163,7 @@ export default { ...@@ -145,6 +163,7 @@ export default {
}] }]
}) })
} }
}
} }
</script> </script>
<style scoped> <style scoped>
......
...@@ -124,12 +124,12 @@ ...@@ -124,12 +124,12 @@
}, },
{ {
name: '商机来源', name: '商机来源',
path: '/setting/taxonomy?term=10', path: '/setting/taxonomy/term/10',
icon: 'fa fa-fw fa-map-pin' icon: 'fa fa-fw fa-map-pin'
}, },
{ {
name: '销售预测', name: '销售预测',
path: '/setting/taxonomy?term=13', path: '/setting/taxonomy/term/13',
icon: 'fa fa-fw fa-signal' 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 @@ ...@@ -16,6 +16,7 @@
@update:clientList="form =>{ updateForm(form) }"> @update:clientList="form =>{ updateForm(form) }">
</search-form> </search-form>
<div class="page-body-content"> <div class="page-body-content">
<NoList v-if="result.list.length === 0"/>
<Item <Item
v-for="item in result.list" v-for="item in result.list"
:item="item" :item="item"
...@@ -71,6 +72,7 @@ import Pagenation from './supplierPagenation' ...@@ -71,6 +72,7 @@ import Pagenation from './supplierPagenation'
import clickOutside from '@/lib/bind' import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams' import SetParams from '../common/setParams'
import singleRadioTool from '../common/singleRadioTool' import singleRadioTool from '../common/singleRadioTool'
import NoList from '../common/noList.vue'
import { import {
requestAPI, requestAPI,
api api
...@@ -86,7 +88,8 @@ export default { ...@@ -86,7 +88,8 @@ export default {
Item, Item,
FormModal, FormModal,
Pagenation, Pagenation,
singleRadioTool singleRadioTool,
NoList
}, },
directives: { directives: {
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
@update:item="val => { reimTypeChange(val) }"> @update:item="val => { reimTypeChange(val) }">
</singleRadioTool> </singleRadioTool>
</div> </div>
<NoList v-if="result.list.length === 0"/>
<GroupItem <GroupItem
v-for="item in result.list" v-for="item in result.list"
:item="item" :item="item"
...@@ -71,6 +72,7 @@ import Pagenation from './groupPagenation' ...@@ -71,6 +72,7 @@ import Pagenation from './groupPagenation'
import clickOutside from '@/lib/bind' import clickOutside from '@/lib/bind'
import singleRadioTool from '../common/singleRadioTool' import singleRadioTool from '../common/singleRadioTool'
import SetParams from '../common/setParams' import SetParams from '../common/setParams'
import NoList from '../common/noList.vue'
import { import {
requestAPI, requestAPI,
api api
...@@ -86,7 +88,8 @@ export default { ...@@ -86,7 +88,8 @@ export default {
GroupItem, GroupItem,
TaskGroupModal, TaskGroupModal,
Pagenation, Pagenation,
singleRadioTool singleRadioTool,
NoList
}, },
directives: { directives: {
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
@update:item="val => { reimTypeChange(val) }"> @update:item="val => { reimTypeChange(val) }">
</singleRadioTool> </singleRadioTool>
</div> </div>
<NoList v-if="result.list.length === 0"/>
<TaskItem <TaskItem
v-for="item in result.list" v-for="item in result.list"
:item="item" :item="item"
...@@ -60,6 +61,7 @@ import Pagenation from './taskPagenation' ...@@ -60,6 +61,7 @@ import Pagenation from './taskPagenation'
import clickOutside from '@/lib/bind' import clickOutside from '@/lib/bind'
import singleRadioTool from '../common/singleRadioTool' import singleRadioTool from '../common/singleRadioTool'
import SetParams from '../common/setParams' import SetParams from '../common/setParams'
import NoList from '../common/noList.vue'
import { import {
requestAPI, requestAPI,
api api
...@@ -75,7 +77,8 @@ export default { ...@@ -75,7 +77,8 @@ export default {
TaskItem, TaskItem,
TaskModal, TaskModal,
Pagenation, Pagenation,
singleRadioTool singleRadioTool,
NoList
}, },
directives: { 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