提交 34a2d38e 编写于 作者: chengxiang.li's avatar chengxiang.li

学分管理页面添加新增确认弹窗及空列表数据展示优化

上级 daa709f2
...@@ -76,6 +76,12 @@ ...@@ -76,6 +76,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="disapprove" label="失败原因" show-overflow-tooltip width="200"></el-table-column> <el-table-column align="center" prop="disapprove" label="失败原因" show-overflow-tooltip width="200"></el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
</div>
</div>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
...@@ -347,6 +353,14 @@ ...@@ -347,6 +353,14 @@
.list-wrap{ .list-wrap{
padding: 10px; padding: 10px;
background: #fff; background: #fff;
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
.el-button--small{ .el-button--small{
font-size: 14px; font-size: 14px;
} }
......
...@@ -44,11 +44,16 @@ ...@@ -44,11 +44,16 @@
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
</div>
</div>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
v-if="tableData && tableData.length > 0"
class="pagination-style" class="pagination-style"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -72,10 +77,10 @@ ...@@ -72,10 +77,10 @@
center> center>
<el-form ref="addForm" :rules="rules" :model="addForm" label-width="120px"> <el-form ref="addForm" :rules="rules" :model="addForm" label-width="120px">
<el-form-item label="学分名称:" class="search-item" prop="name"> <el-form-item label="学分名称:" class="search-item" prop="name">
<el-input v-model="addForm.name" size="small" class="form-width"></el-input> <el-input v-model="addForm.name" size="small" class="wide-form"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="主管机构:" class="search-item" prop="org"> <el-form-item label="主管机构:" class="search-item" prop="org">
<el-input v-model="addForm.org" size="small" class="form-width"></el-input> <el-input v-model="addForm.org" size="small" class="wide-form"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="学习形式:" class="search-item" prop="studyType"> <el-form-item label="学习形式:" class="search-item" prop="studyType">
<el-radio-group v-model="addForm.studyType"> <el-radio-group v-model="addForm.studyType">
...@@ -103,6 +108,20 @@ ...@@ -103,6 +108,20 @@
</span> </span>
</el-dialog> </el-dialog>
<!-- 新增的确认弹窗 -->
<el-dialog
:visible.sync="submitConfirmVisible"
:close-on-click-modal="false"
:show-close="false"
width="350px"
center>
<p style="text-align: center;">提交后不可修改,请确认</p>
<span slot="footer" class="dialog-footer">
<el-button @click="submitConfirmVisible = false">取 消</el-button>
<el-button type="primary" @click="submitConfirmClick">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -140,6 +159,7 @@ ...@@ -140,6 +159,7 @@
relateList: [], // 关联学分证书列表 relateList: [], // 关联学分证书列表
centerDialogVisible: false, centerDialogVisible: false,
submitConfirmVisible: false,
tableData: [], tableData: [],
handleStatusText: { // 1 已创建状态>显示上架; 2 上架状态>显示下架; 3 下架状态>显示上架 handleStatusText: { // 1 已创建状态>显示上架; 2 上架状态>显示下架; 3 下架状态>显示上架
...@@ -193,7 +213,7 @@ ...@@ -193,7 +213,7 @@
this.creditStatus = res.data; this.creditStatus = res.data;
} else if (type == 'study_type') { } else if (type == 'study_type') {
this.studyType = res.data; this.studyType = res.data;
console.log('学习形式: ', this.studyType) // console.log('学习形式: ', this.studyType)
} }
} else { } else {
this.$message(res.message); this.$message(res.message);
...@@ -216,7 +236,7 @@ ...@@ -216,7 +236,7 @@
getCreditListReq(req).then(res => { getCreditListReq(req).then(res => {
closeLoading(this); closeLoading(this);
if (res.code == "000000") { if (res.code == "000000") {
console.log('@@@@@@@', res.data.contentList) // console.log('@@@@@@@', res.data.contentList)
if (res.data && res.data.contentList) { if (res.data && res.data.contentList) {
this.tableData = res.data.contentList; this.tableData = res.data.contentList;
this.totalRows = res.data.total; this.totalRows = res.data.total;
...@@ -234,25 +254,16 @@ ...@@ -234,25 +254,16 @@
// 操作内的文案 // 操作内的文案
returnHandleText(row) { returnHandleText(row) {
let status = row.status; let status = row.status;
console.log('>>>>**** status ', status) // console.log('>>>>**** status ', status)
return this.handleStatusText[status] || ''; return this.handleStatusText[status] || '';
}, },
// 获取 关联学分证书 // 获取 关联学分证书
getRelatedCredit() { getRelatedCredit() {
// let req = {
// token: localStorage.getItem('storageToken') || localStorage.getItem('token'),
// };
// this.cmsPOST("api/PICACertificateModalManageServiceImpl/getCertificateEntryList.validate", req).then(res => {
// if (res.code == "000000") {
// console.log(' 获取 关联学分证书: ', res)
// }
// });
let req = {}; let req = {};
getRelatedCreditReq(req).then(res => { getRelatedCreditReq(req).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
console.log('获取关联学分证书接口 ', res) // console.log('获取关联学分证书接口 ', res)
if (res.data && res.data.list) { if (res.data && res.data.list) {
this.relateList = res.data.list; this.relateList = res.data.list;
} else { } else {
...@@ -267,7 +278,7 @@ ...@@ -267,7 +278,7 @@
}, },
operationClick(row) { operationClick(row) {
console.log('操作: ', row) // console.log('操作: ', row)
let status = row.status; let status = row.status;
// 1 已创建状态>显示上架; 2 上架状态>显示下架; 3 下架状态>显示上架 // 1 已创建状态>显示上架; 2 上架状态>显示下架; 3 下架状态>显示上架
if (status == 1 || status == 3){ // 去上架 if (status == 1 || status == 3){ // 去上架
...@@ -282,10 +293,10 @@ ...@@ -282,10 +293,10 @@
let req = {}; let req = {};
goUpReq(req, id).then(res => { goUpReq(req, id).then(res => {
closeLoading(this); closeLoading(this);
console.log('上架英文', res) // console.log('上架英文', res)
if (res.code == "000000") { if (res.code == "000000") {
this.getCreditList(); this.getCreditList();
}else{ } else {
this.$message(res.message); this.$message(res.message);
} }
}).catch(err => { }).catch(err => {
...@@ -298,10 +309,10 @@ ...@@ -298,10 +309,10 @@
let req = {}; let req = {};
goDownReq(req, id).then(res => { goDownReq(req, id).then(res => {
closeLoading(this); closeLoading(this);
console.log('下架英文', res) // console.log('下架英文', res)
if (res.code == "000000") { if (res.code == "000000") {
this.getCreditList(); this.getCreditList();
}else{ } else {
this.$message(res.message); this.$message(res.message);
} }
}).catch(err => { }).catch(err => {
...@@ -327,23 +338,30 @@ ...@@ -327,23 +338,30 @@
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
// alert('submit!'); // alert('submit!');
this.goAddNew(); this.showSubmitConfirm();
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
return false; return false;
} }
}); });
}, },
showSubmitConfirm() {
this.submitConfirmVisible = true;
},
submitConfirmClick() {
this.goAddNew();
},
goAddNew() { goAddNew() {
let req = this.addForm; let req = this.addForm;
goAddNewReq(req).then(res => { goAddNewReq(req).then(res => {
closeLoading(this); closeLoading(this);
console.log('新增积分记录', res) // console.log('新增积分记录', res)
if (res.code == "000000") { if (res.code == "000000") {
this.submitConfirmVisible = false;
this.hideNewAddForm(); this.hideNewAddForm();
this.getCreditList(); this.getCreditList();
}else{ } else {
this.$message(res.message); this.$message(res.message);
} }
}).catch(err => { }).catch(err => {
...@@ -352,7 +370,7 @@ ...@@ -352,7 +370,7 @@
}, },
handleSizeChange(val){ handleSizeChange(val){
console.log('handleSizeChange>>>') // console.log('handleSizeChange>>>')
this.searchForm.pageSize = val; this.searchForm.pageSize = val;
this.goToSearch(); this.goToSearch();
}, },
...@@ -370,6 +388,12 @@ ...@@ -370,6 +388,12 @@
<style lang="scss"> <style lang="scss">
.credit-manage-wrap{ .credit-manage-wrap{
.form-width{
width: 200px;
}
.wide-form{
width: 300px;
}
.credit-list{ .credit-list{
padding: 10px; padding: 10px;
background: #fff; background: #fff;
...@@ -379,9 +403,7 @@ ...@@ -379,9 +403,7 @@
.search-item{ .search-item{
float: left; float: left;
} }
.form-width{
width: 200px;
}
.btn-list{ .btn-list{
float: right; float: right;
margin-right: 30px; margin-right: 30px;
...@@ -389,6 +411,14 @@ ...@@ -389,6 +411,14 @@
margin-left: 0 !important; margin-left: 0 !important;
} }
} }
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
} }
} }
</style> </style>
\ No newline at end of file
...@@ -53,6 +53,12 @@ ...@@ -53,6 +53,12 @@
<el-button @click="goToApplyDetail(scope.row)" type="text" size="small">查看申请明细</el-button> <el-button @click="goToApplyDetail(scope.row)" type="text" size="small">查看申请明细</el-button>
</template> </template>
</el-table-column> </el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
</div>
</div>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
...@@ -126,7 +132,7 @@ ...@@ -126,7 +132,7 @@
getSendListReq(req).then(res => { getSendListReq(req).then(res => {
closeLoading(this); closeLoading(this);
if (res.code == "000000") { if (res.code == "000000") {
console.log('@@@@@@@', res) // console.log('@@@@@@@', res)
if (res.data && res.data.data) { if (res.data && res.data.data) {
this.tableData = res.data.data; this.tableData = res.data.data;
this.totalRows = res.data.totalRows; this.totalRows = res.data.totalRows;
...@@ -152,7 +158,7 @@ ...@@ -152,7 +158,7 @@
this.multipleSelection = val; this.multipleSelection = val;
}, },
goToApplyDetail(row) { goToApplyDetail(row) {
console.log('去申请明细页面 ', row); // console.log('去申请明细页面 ', row);
this.$router.push({ this.$router.push({
path: '/apply-detail', path: '/apply-detail',
query: { query: {
...@@ -162,7 +168,7 @@ ...@@ -162,7 +168,7 @@
}, },
handleSizeChange(val){ handleSizeChange(val){
console.log('handleSizeChange>>>') // console.log('handleSizeChange>>>')
this.searchForm.pageSize = val; this.searchForm.pageSize = val;
this.goToSearch(); this.goToSearch();
}, },
...@@ -210,6 +216,14 @@ ...@@ -210,6 +216,14 @@
overflow: hidden; overflow: hidden;
border-bottom: 1px dashed #efefef; border-bottom: 1px dashed #efefef;
} }
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
} }
} }
......
...@@ -31,6 +31,12 @@ ...@@ -31,6 +31,12 @@
<el-button @click="goToDelete(scope.row)" type="text" size="small">删除</el-button> <el-button @click="goToDelete(scope.row)" type="text" size="small">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<div slot="empty">
<div class="table-empty">
<img src="../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
</div>
</div>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
...@@ -174,8 +180,7 @@ ...@@ -174,8 +180,7 @@
let req = this.searchForm; let req = this.searchForm;
getAuthTableReq(req).then(res => { getAuthTableReq(req).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
console.log('表格列表 ', res) // console.log('表格列表 ', res)
// this.accessList = res.data;
this.tableData = res.data.contentList; this.tableData = res.data.contentList;
this.totalRows = res.data.total; this.totalRows = res.data.total;
...@@ -220,7 +225,7 @@ ...@@ -220,7 +225,7 @@
let req = {}; let req = {};
getUserListReq(req).then(res => { getUserListReq(req).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
console.log('获取用户列表 ', res) // console.log('获取用户列表 ', res)
this.nameList = res.data; this.nameList = res.data;
} else { } else {
this.$message(res.message); this.$message(res.message);
...@@ -255,7 +260,6 @@ ...@@ -255,7 +260,6 @@
// debugger; // debugger;
let req = {}; let req = {};
if (this.isAdd) { if (this.isAdd) {
// let { authId, doctorId } = this.addEditForm;
req = { req = {
authId: this.addEditForm.authId, authId: this.addEditForm.authId,
doctorId: this.addEditForm.doctorId, doctorId: this.addEditForm.doctorId,
...@@ -271,7 +275,7 @@ ...@@ -271,7 +275,7 @@
if (res.code == "000000") { if (res.code == "000000") {
this.addEditVisible = false; this.addEditVisible = false;
this.goToSearch(); this.goToSearch();
console.log('新增/编辑权限 ', res) // console.log('新增/编辑权限 ', res)
} else { } else {
this.$message(res.message); this.$message(res.message);
} }
...@@ -294,7 +298,7 @@ ...@@ -294,7 +298,7 @@
}; };
handleDeleteReq(req).then(res => { handleDeleteReq(req).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
console.log('删除用户列表 ', res) // console.log('删除用户列表 ', res)
this.goToSearch(); this.goToSearch();
this.deleteVisible = false; this.deleteVisible = false;
} else { } else {
...@@ -308,7 +312,7 @@ ...@@ -308,7 +312,7 @@
this.deleteVisible = false; this.deleteVisible = false;
}, },
handleSizeChange(val){ handleSizeChange(val){
console.log('handleSizeChange>>>') // console.log('handleSizeChange>>>')
this.searchForm.pageSize = val; this.searchForm.pageSize = val;
this.goToSearch(1); this.goToSearch(1);
...@@ -356,6 +360,14 @@ ...@@ -356,6 +360,14 @@
float: right; float: right;
margin: 10px 0 20px; margin: 10px 0 20px;
} }
.table-empty {
img {
width: 100px;
}
p {
margin-top: -50px;
}
}
} }
} }
</style> </style>
\ No newline at end of file
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
] ]
},{ },{
title: 'CME', title: 'CME',
icon: 'el-icon-tickets', icon: 'el-icon-reading',
index: 'credit-manage', index: 'credit-manage',
subs: [ subs: [
{ {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册