Commit 4ce694d2 by 黄森林

增加异常提示,订单导出功能修改

parent bf051d3d
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop/';
//订单
let deleteExcel = (params) => postAction(prefix + "exportExcel/deleteExcel" , params);
let uploadExcel = (params) => downFilePost(prefix + "exportExcel/uploadExcel" , params);
let listExportExcel = (params) => postAction(prefix + "exportExcel/listExportExcel" , params);
export {
deleteExcel,
listExportExcel,
uploadExcel
}
...@@ -3,7 +3,7 @@ const prefix = '/manager/ciop/'; ...@@ -3,7 +3,7 @@ const prefix = '/manager/ciop/';
//订单 //订单
let orderList = (params) => postAction(prefix + "order/list" , params); let orderList = (params) => postAction(prefix + "order/list" , params);
let download = (params) => downFilePost(prefix + "order/download" , params); let download = (params) => postAction(prefix + "order/download" , params);
//返回订单历史状态 //返回订单历史状态
let selectOrderHis = (params) => postAction(prefix +"order/selectOrderHis" , params); let selectOrderHis = (params) => postAction(prefix +"order/selectOrderHis" , params);
let reviewStudentIdCard = (params) => postAction(prefix +"order/reviewStudentIdCard" , params); let reviewStudentIdCard = (params) => postAction(prefix +"order/reviewStudentIdCard" , params);
......
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
<new-poster ref="model1"></new-poster> <new-poster ref="model1"></new-poster>
<!--列表--> <!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"> <s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="createTime" slot-scope="text"> <template slot="createTime" slot-scope="text">
{{ text | dayjs}} {{ text | dayjs}}
</template> </template>
<template slot="picture" slot-scope="text"> <template slot="picture" slot-scope="text">
<img style="width: 20%" :src="text" @click="imgClick(text)"> <img style="width: 20%" :src="apis + text" @click="imgClick(text)">
</template> </template>
<template slot="enable" slot-scope="text"> <template slot="enable" slot-scope="text">
<span v-if="text == 0">不启用</span> <span v-if="text == 0">不启用</span>
...@@ -56,9 +56,6 @@ ...@@ -56,9 +56,6 @@
</template> </template>
</s-table> </s-table>
<!----弹框--> <!----弹框-->
<a-modal :title="add ?'添加大学宽带信息': '编辑大学宽带信息'" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="1024px">
</a-modal>
<a-drawer <a-drawer
title="海报图片" title="海报图片"
placement="right" placement="right"
...@@ -87,6 +84,7 @@ ...@@ -87,6 +84,7 @@
}, },
data(){ data(){
return { return {
emptyText: {emptyText: '暂无数据'},
jumpPath:'http://hhrcode.winsun-aly.com/#/hhr/home?id=', jumpPath:'http://hhrcode.winsun-aly.com/#/hhr/home?id=',
imgInfo:'', imgInfo:'',
visiblepicture:false, visiblepicture:false,
...@@ -113,6 +111,7 @@ ...@@ -113,6 +111,7 @@
publicNumber:'', publicNumber:'',
universityId:'' universityId:''
}, },
apis:'',
columns: [ columns: [
{dataIndex: 'picture', title: '图片 ', scopedSlots: {customRender: 'picture'},align: 'center'}, {dataIndex: 'picture', title: '图片 ', scopedSlots: {customRender: 'picture'},align: 'center'},
{dataIndex: 'createName', width: 100, title: '创建人',align: 'center'}, {dataIndex: 'createName', width: 100, title: '创建人',align: 'center'},
...@@ -128,6 +127,10 @@ ...@@ -128,6 +127,10 @@
}] }]
, ,
rowdata: parameter => { rowdata: parameter => {
const env = process.env.NODE_ENV; //获取当前环境
if(env === 'development'){ //测试环境默认添加前缀
this.apis = '/api/';
}
let params = { let params = {
pageNo: parameter.pageNo, pageNo: parameter.pageNo,
pageSize: parameter.pageSize, pageSize: parameter.pageSize,
...@@ -136,6 +139,8 @@ ...@@ -136,6 +139,8 @@
return listPicture(params).then(res => { return listPicture(params).then(res => {
let data = {} let data = {}
if (res.state !== 'success') { if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = { data = {
data: [], data: [],
pageSize: parameter.pageSize, pageSize: parameter.pageSize,
...@@ -161,7 +166,7 @@ ...@@ -161,7 +166,7 @@
this.visiblepicture = false; this.visiblepicture = false;
}, },
imgClick(res){ imgClick(res){
this.imgInfo=res this.imgInfo=this.apis + res
this.visiblepicture=true this.visiblepicture=true
}, },
uploadPicture(file) { uploadPicture(file) {
...@@ -198,6 +203,7 @@ ...@@ -198,6 +203,7 @@
}, },
addPoster(picture,id){ addPoster(picture,id){
let url = this.jumpPath+id let url = this.jumpPath+id
picture = this.apis + picture
this.$refs.model1.showModal(picture,url); this.$refs.model1.showModal(picture,url);
}, },
search() { search() {
......
...@@ -73,14 +73,19 @@ export default { ...@@ -73,14 +73,19 @@ export default {
methods: { methods: {
showModal(picture,url) { showModal(picture,url) {
this.codeText=url this.codeText=url
console.log(this.codeText)
this.getBase64(picture, 'jpeg', (base64) =>{ this.getBase64(picture, 'jpeg', (base64) =>{
// 给原生img对象的src属性赋值 // 给原生img对象的src属性赋值
this.images=base64; this.images=base64;
this.visible = true; this.visible = true;
}); });
this.$nextTick(()=>{ /* this.$nextTick(()=>{
this.newCode() this.newCode()
}); });*/
setTimeout(() =>{
this.newCode()
},200);
}, },
onClose() { onClose() {
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</a-form> </a-form>
<!--列表--> <!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"> <s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="genderoperation" slot-scope="text"> <template slot="genderoperation" slot-scope="text">
<span v-if="text==1"></span> <span v-if="text==1"></span>
<span v-else></span> <span v-else></span>
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
}, },
data: function () { data: function () {
return { return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this, {name: 'Formtable'}), Formtable: this.$form.createForm(this, {name: 'Formtable'}),
queryParam: { queryParam: {
name: '', name: '',
...@@ -140,6 +141,7 @@ ...@@ -140,6 +141,7 @@
let data = {} let data = {}
if (res.state !== 'success') { if (res.state !== 'success') {
this.$message.error("查询失败!", 5); this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = { data = {
data: [], data: [],
pageSize: parameter.pageSize, pageSize: parameter.pageSize,
......
<template>
<div class="flex-container">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline">
<a-row :gutter="24">
<a-col :md="6" :sm="12">
<a-form-item label="文件名:">
<a-input placeholder="文件名" v-model="queryParam.fileName"></a-input>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text, record">
<span>
<a @click="downloadExcel(record.id)">下载</a>
<a-divider type="vertical"/>
<a @click="remove(record.id)">删除</a>
</span>
</template>
<template slot="createTime" slot-scope="text">{{ text | dayjs}}</template>
</s-table>
</div>
</template>
<script>
import STable from '@/components/table';
import {deleteExcel,listExportExcel,uploadExcel} from "@/api/school-center/exportExcel"
import {cloneObject,exportFile} from '@/utils/util';
import moment from "moment";
export default {
name: "exportExcel",
components: {
STable,
},
data(){
return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this),
modifyvisible: false,
add: true,
queryParam: {
fileName :''
},
modelData:{
id:'',
userName:'',
sign:''
},
columns: [
{dataIndex: 'fileName', title: '文件名'},
{dataIndex: 'createName', title: '导出人'},
{dataIndex: 'createTime', title: '导出时间', scopedSlots: {customRender: 'createTime'}},
{
dataIndex: 'operation',
title: '操作',
scopedSlots: {customRender: 'operation'},
fixed: "right"
}]
,
rowdata: parameter => {
let params = {
pageNo: parameter.pageNo,
pageSize: parameter.pageSize
}
let obj = cloneObject(this.queryParam)
//表示
return listExportExcel(Object.assign(params,obj)).then(res => {
let data = {}
if (res.state !== 'success') {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = {
data: [],
pageSize: parameter.pageSize,
pageNo: 1,
totalCount: 0
}
} else {
data = {
data: res.data.records,
pageSize: parameter.pageSize,
pageNo: parameter.pageNo,
totalCount: res.data.total
}
}
return data
})
}
}
},
methods:{
moment,
search() {
this.$refs.table.refresh({search: true})
},
remove(exportId) {
deleteExcel({exportId}).then(res => {
if (res.state == 'success') {
this.$message.success(res.data, 5);
}else {
this.$message.success(res.msg, 5);
}
})
},
downloadExcel(exportId) {
let nowdate = moment().format("YYYY-MM-DD");
exportFile(
uploadExcel({exportId}),
"订单清单" + nowdate + ".xls",
);
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
ref="table" ref="table"
size="small" size="small"
class="flex-filling" class="flex-filling"
:locale="emptyText"
></s-table> ></s-table>
</div> </div>
</template> </template>
...@@ -48,7 +49,7 @@ export default { ...@@ -48,7 +49,7 @@ export default {
}, },
data() { data() {
return { return {
//下载完成状态 emptyText: {emptyText: '暂无数据'},
callback: false, callback: false,
Formtable: this.$form.createForm(this), Formtable: this.$form.createForm(this),
queryParam: { queryParam: {
...@@ -193,6 +194,8 @@ export default { ...@@ -193,6 +194,8 @@ export default {
return reportList(Object.assign(params, obj)).then(res => { return reportList(Object.assign(params, obj)).then(res => {
let data = {}; let data = {};
if (res.state !== "success") { if (res.state !== "success") {
this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = { data = {
data: [] data: []
}; };
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</div> </div>
<!--列表--> <!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"> <s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<!--拦截器--> <!--拦截器-->
<template slot="statusDefault" slot-scope="text"> <template slot="statusDefault" slot-scope="text">
<span v-if="text=='1'"> <span v-if="text=='1'">
...@@ -165,6 +165,7 @@ ...@@ -165,6 +165,7 @@
}, },
data: function () { data: function () {
return { return {
emptyText: {emptyText: '暂无数据'},
previewVisible: false, previewVisible: false,
previewImage: '', previewImage: '',
fileList: [ fileList: [
...@@ -231,6 +232,7 @@ ...@@ -231,6 +232,7 @@
return findByList(Object.assign(params, obj)).then(res => { return findByList(Object.assign(params, obj)).then(res => {
let data = {} let data = {}
if (res.state !== 'success') { if (res.state !== 'success') {
this.emptyText.emptyText = '查询失败!'
this.$message.error("查询失败!", 5); this.$message.error("查询失败!", 5);
data = { data = {
data: [], data: [],
......
...@@ -78,11 +78,7 @@ ...@@ -78,11 +78,7 @@
<a-col :md="6" :sm="12"> <a-col :md="6" :sm="12">
<a-button @click="search()" type="primary">查询</a-button> <a-button @click="search()" type="primary">查询</a-button>
<a-button v-show="!callback" @click="handleSubmit" style="margin-left: 10px">导出</a-button> <a-button @click="handleSubmit" style="margin-left: 10px">导出</a-button>
<a-button v-show="callback" @click="handleSubmit" style="margin-left: 10px">
导出中
<a-spin style="margin-left: 5px" size="small" />
</a-button>
<a-dropdown> <a-dropdown>
<a-menu slot="overlay" @click="handleMenuClick"> <a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="1"> <a-menu-item key="1">
...@@ -110,6 +106,7 @@ ...@@ -110,6 +106,7 @@
ref="table" ref="table"
size="small" size="small"
class="flex-filling" class="flex-filling"
:locale="emptyText"
> >
<!--拦截器--> <!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text">{{ text | dayjs}}</template> <template slot="productLastUpdateTime" slot-scope="text">{{ text | dayjs}}</template>
...@@ -411,6 +408,7 @@ export default { ...@@ -411,6 +408,7 @@ export default {
}, },
data() { data() {
return { return {
emptyText: {emptyText: '暂无数据'},
reviewStudentImg: "", reviewStudentImg: "",
reviewStudent: { reviewStudent: {
id: "", id: "",
...@@ -431,7 +429,6 @@ export default { ...@@ -431,7 +429,6 @@ export default {
importTile: "", importTile: "",
modifyvisible: false, modifyvisible: false,
title: ConstantActivity.title, title: ConstantActivity.title,
callback: false,
Formtable: this.$form.createForm(this), Formtable: this.$form.createForm(this),
visible: false, visible: false,
abnormalInfo: [], abnormalInfo: [],
...@@ -445,6 +442,7 @@ export default { ...@@ -445,6 +442,7 @@ export default {
pStyle2: { pStyle2: {
marginBottom: "24px" marginBottom: "24px"
}, },
apis:'',
queryParam: { queryParam: {
createTimeStart: "", createTimeStart: "",
createTimeEnd: "", createTimeEnd: "",
...@@ -490,6 +488,10 @@ export default { ...@@ -490,6 +488,10 @@ export default {
} }
], ],
rowdata: parameter => { rowdata: parameter => {
const env = process.env.NODE_ENV; //获取当前环境
if(env === 'development'){ //测试环境默认添加前缀
this.apis = '/api/';
}
let params = { let params = {
pageNo: parameter.pageNo, pageNo: parameter.pageNo,
pageSize: parameter.pageSize pageSize: parameter.pageSize
...@@ -501,6 +503,7 @@ export default { ...@@ -501,6 +503,7 @@ export default {
let data = {}; let data = {};
if (res.state !== "success") { if (res.state !== "success") {
this.$message.error("查询失败!", 5); this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = { data = {
data: [], data: [],
pageSize: parameter.pageSize, pageSize: parameter.pageSize,
...@@ -531,7 +534,7 @@ export default { ...@@ -531,7 +534,7 @@ export default {
} }
}, },
reviewStudentIdCard(res) { reviewStudentIdCard(res) {
this.reviewStudentImg = res.studenCard; this.reviewStudentImg =this.apis + res.studenCard;
/*this.reviewStudentImg =this.baseUrl+'abstract0'+1+'.jpg'*/ /*this.reviewStudentImg =this.baseUrl+'abstract0'+1+'.jpg'*/
this.reviewStudent.studentCardCheckStatus = res.studentCardCheckStatus; this.reviewStudent.studentCardCheckStatus = res.studentCardCheckStatus;
this.reviewStudent.checkFail = res.checkFail; this.reviewStudent.checkFail = res.checkFail;
...@@ -703,19 +706,19 @@ export default { ...@@ -703,19 +706,19 @@ export default {
this.visible = false; this.visible = false;
}, },
showDrawer(data) { showDrawer(data) {
this.certificatePhoto.push(data.idCardz); this.certificatePhoto.push( this.apis+data.idCardz);
this.certificatePhoto.push(data.idCardf); this.certificatePhoto.push(this.apis+data.idCardf);
this.certificatePhoto.push(data.idCardzs); this.certificatePhoto.push(this.apis+data.idCardzs);
this.certificatePhoto.push(data.studenCard); this.certificatePhoto.push(this.apis+data.studenCard);
/* this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png') /* this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png')
this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png') this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png')
this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png') this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png')
this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png')*/ this.certificatePhoto.push('http://yrym.winsun-aly.com/gdtel-xyzx-hhr/images/yrym-ruanyan-logo.png')*/
if ( if (
this.certificatePhoto[0] == null && this.certificatePhoto[0] == '/api/null' &&
this.certificatePhoto[1] == null && this.certificatePhoto[1] == '/api/null' &&
this.certificatePhoto[2] == null && this.certificatePhoto[2] == '/api/null' &&
this.certificatePhoto[3] == null this.certificatePhoto[3] == '/api/null'
) { ) {
this.imgShow = false; this.imgShow = false;
} else { } else {
...@@ -771,7 +774,16 @@ export default { ...@@ -771,7 +774,16 @@ export default {
} }
}, },
handleSubmit() { handleSubmit() {
if (this.callback == true) { let downqueryParam = this.queryParam;
download(downqueryParam).then(res => {
if (res.state == "success") {
this.search();
this.$message.success(res.data, 5);
} else {
this.$message.error(res.msg, 5);
}
})
/* if (this.callback == true) {
this.$message.warn("正在导出中...", 5); this.$message.warn("正在导出中...", 5);
} }
let downqueryParam = this.queryParam; let downqueryParam = this.queryParam;
...@@ -781,11 +793,15 @@ export default { ...@@ -781,11 +793,15 @@ export default {
download(downqueryParam), download(downqueryParam),
"订单清单" + nowdate + ".xls", "订单清单" + nowdate + ".xls",
this.downloadstatu this.downloadstatu
); );*/
},
downloadstatu() {
this.callback = false;
}, },
/* downloadstatu(exportId) {
let nowdate = moment().format("YYYY-MM-DD");
exportFile(
uploadExcel({exportId}),
"订单清单" + nowdate + ".xls",
);
},*/
selectOrderHis(orderId) { selectOrderHis(orderId) {
selectOrderHis({ orderId }).then(res => { selectOrderHis({ orderId }).then(res => {
let liu = res.data; let liu = res.data;
...@@ -807,7 +823,7 @@ export default { ...@@ -807,7 +823,7 @@ export default {
this.search(); this.search();
this.$message.success(res.data, 5); this.$message.success(res.data, 5);
} else { } else {
this.$message.error(res.data, 5); this.$message.error(res.msg, 5);
} }
}); });
} }
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</div> </div>
<!--列表--> <!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"> <s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器--> <!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text"> <template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}} {{ text | dayjs}}
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
}, },
data(){ data(){
return { return {
//下载完成状态 emptyText: {emptyText: '暂无数据'},
callback:false, callback:false,
Formtable: this.$form.createForm(this), Formtable: this.$form.createForm(this),
visible: false, visible: false,
...@@ -275,6 +275,7 @@ ...@@ -275,6 +275,7 @@
let data = {} let data = {}
if (res.state !== 'success') { if (res.state !== 'success') {
this.$message.error("查询失败!", 5); this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = { data = {
data: [], data: [],
pageSize: parameter.pageSize, pageSize: parameter.pageSize,
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<!--列表--> <!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"> <s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text,record"> <template slot="operation" slot-scope="text,record">
<a @click="modifyfunction(record)">编辑</a> <a @click="modifyfunction(record)">编辑</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
}, },
data: function () { data: function () {
return { return {
emptyText: {emptyText: '暂无数据'},
header:{ header:{
"Authorization":Vue.ls.get(ACCESS_TOKEN) "Authorization":Vue.ls.get(ACCESS_TOKEN)
}, },
...@@ -193,6 +194,7 @@ ...@@ -193,6 +194,7 @@
let data = {} let data = {}
if (res.state !== 'success') { if (res.state !== 'success') {
this.$message.error("查询失败!", 5); this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = { data = {
data: [], data: [],
pageSize: parameter.pageSize, pageSize: parameter.pageSize,
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</div> </div>
<!--列表--> <!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"> <s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器--> <!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text"> <template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}} {{ text | dayjs}}
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
}, },
data(){ data(){
return { return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this), Formtable: this.$form.createForm(this),
modifyvisible: false, modifyvisible: false,
add: true, add: true,
...@@ -161,6 +162,7 @@ ...@@ -161,6 +162,7 @@
let data = {} let data = {}
if (res.state !== 'success') { if (res.state !== 'success') {
this.$message.error("查询失败!", 5); this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = { data = {
data: [], data: [],
pageSize: parameter.pageSize, pageSize: parameter.pageSize,
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</div> </div>
<!--列表--> <!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"> <s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<!--拦截器--> <!--拦截器-->
<template slot="productLastUpdateTime" slot-scope="text"> <template slot="productLastUpdateTime" slot-scope="text">
{{ text | dayjs}} {{ text | dayjs}}
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
}, },
data(){ data(){
return { return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this), Formtable: this.$form.createForm(this),
modifyvisible: false, modifyvisible: false,
add: true, add: true,
...@@ -164,6 +165,7 @@ ...@@ -164,6 +165,7 @@
let data = {} let data = {}
if (res.state !== 'success') { if (res.state !== 'success') {
this.$message.error("查询失败!", 5); this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = { data = {
data: [], data: [],
pageSize: parameter.pageSize, pageSize: parameter.pageSize,
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</div> </div>
<!--列表--> <!--列表-->
<s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"> <s-table :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling" :locale="emptyText">
<template slot="operation" slot-scope="text, record"> <template slot="operation" slot-scope="text, record">
<span> <span>
<a @click="modifyfunction(record)">修改</a> <a @click="modifyfunction(record)">修改</a>
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
}, },
data(){ data(){
return { return {
emptyText: {emptyText: '暂无数据'},
Formtable: this.$form.createForm(this), Formtable: this.$form.createForm(this),
modifyvisible: false, modifyvisible: false,
add: true, add: true,
...@@ -94,6 +95,7 @@ ...@@ -94,6 +95,7 @@
let data = {} let data = {}
if (res.state !== 'success') { if (res.state !== 'success') {
this.$message.error("查询失败!", 5); this.$message.error("查询失败!", 5);
this.emptyText.emptyText = '查询失败!'
data = { data = {
data: [], data: [],
pageSize: parameter.pageSize, pageSize: parameter.pageSize,
......
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