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

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

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