|
@@ -76,17 +76,27 @@
|
|
|
:data="tableData"
|
|
|
style="width: 100%"
|
|
|
@sort-change="handleSort"
|
|
|
- :default-sort = dataSort
|
|
|
+ :default-sort="dataSort"
|
|
|
>
|
|
|
<el-table-column
|
|
|
class="table-firstC"
|
|
|
label="名称"
|
|
|
prop="name"
|
|
|
width="150"
|
|
|
- sortable='custom'
|
|
|
+ sortable="custom"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="英文名"
|
|
|
+ prop="name_english"
|
|
|
+ width="150"
|
|
|
+ sortable="custom"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="作者"
|
|
|
+ prop="author"
|
|
|
+ width="100"
|
|
|
+ sortable="custom"
|
|
|
/>
|
|
|
- <el-table-column label="英文名" prop="name_english" width="150" sortable='custom' />
|
|
|
- <el-table-column label="作者" prop="author" width="100" sortable='custom' />
|
|
|
<el-table-column label="版本" prop="edition" width="100" />
|
|
|
<el-table-column label="出版社" prop="publisher" width="150" />
|
|
|
<el-table-column
|
|
@@ -111,7 +121,7 @@
|
|
|
label="创建时间"
|
|
|
prop="create_time"
|
|
|
width="170"
|
|
|
- sortable='custom'
|
|
|
+ sortable="custom"
|
|
|
/>
|
|
|
<el-table-column fixed="right" label="操作" prop width="370">
|
|
|
<template slot-scope="scope">
|
|
@@ -676,7 +686,9 @@ export default {
|
|
|
diaMyOrgList: [],
|
|
|
typeList: [],
|
|
|
activeName: "courseInfo", // 教材信息tabs
|
|
|
- dataSort: localStorage.getItem("dataSort")?JSON.parse(localStorage.getItem("dataSort")):{}
|
|
|
+ dataSort: localStorage.getItem("dataSort")
|
|
|
+ ? JSON.parse(localStorage.getItem("dataSort"))
|
|
|
+ : {}
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -752,13 +764,13 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
handleClick(row) {
|
|
|
- // if (row.publish_status == 1) {
|
|
|
- // this.$message({
|
|
|
- // type: "warning",
|
|
|
- // message: "此教材处于上架状态不可以进行编辑"
|
|
|
- // });
|
|
|
- // return false;
|
|
|
- // }
|
|
|
+ // if (row.publish_status == 1) {
|
|
|
+ // this.$message({
|
|
|
+ // type: "warning",
|
|
|
+ // message: "此教材处于上架状态不可以进行编辑"
|
|
|
+ // });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
sessionStorage.setItem("Bookdetail", JSON.stringify(row));
|
|
|
this.$router.push("/adultInput?bookId=" + row.id);
|
|
|
},
|
|
@@ -772,49 +784,55 @@ export default {
|
|
|
this.$router.push("/discountCodeList?bookId=" + row.id);
|
|
|
}, // 生成临时链接
|
|
|
handleCreatLink(row) {
|
|
|
- var date1 = new Date();
|
|
|
- var date2 = new Date(date1);
|
|
|
- date2.setDate(date1.getDate() + 30);
|
|
|
- let endtime = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate()
|
|
|
- getContentFile('login_control-CreateValidDateEncryptionString', {
|
|
|
- end_date: endtime,
|
|
|
+ var date1 = new Date();
|
|
|
+ var date2 = new Date(date1);
|
|
|
+ date2.setDate(date1.getDate() + 90);
|
|
|
+ let endtime =
|
|
|
+ date2.getFullYear() +
|
|
|
+ "-" +
|
|
|
+ (date2.getMonth() + 1) +
|
|
|
+ "-" +
|
|
|
+ date2.getDate();
|
|
|
+ getContentFile("login_control-CreateValidDateEncryptionString", {
|
|
|
+ end_date: endtime
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ let link =
|
|
|
+ "https://" +
|
|
|
+ window.location.host +
|
|
|
+ "/GCLS-Book/#/BookBrowsing?bookId=" +
|
|
|
+ row.id +
|
|
|
+ "&encryption=" +
|
|
|
+ res.encryption_string;
|
|
|
+ document.getElementById("temporaryLinks").innerHTML = link;
|
|
|
+ var doc = document,
|
|
|
+ text = doc.getElementById("temporaryLinks"),
|
|
|
+ range,
|
|
|
+ selection;
|
|
|
+ if (doc.body.createTextRange) {
|
|
|
+ range = doc.body.createTextRange();
|
|
|
+ range.moveToElementText(text);
|
|
|
+ range.select();
|
|
|
+ } else if (window.getSelection) {
|
|
|
+ selection = window.getSelection();
|
|
|
+ range = doc.createRange();
|
|
|
+ range.selectNodeContents(text);
|
|
|
+ selection.removeAllRanges();
|
|
|
+ selection.addRange(range);
|
|
|
+ }
|
|
|
+ document.execCommand("copy");
|
|
|
+ this.$message({
|
|
|
+ message: "复制成功",
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ window.getSelection().removeAllRanges();
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
- let link =
|
|
|
- "https://" +
|
|
|
- window.location.host +
|
|
|
- "/GCLS-Book/#/BookBrowsing?bookId=" +
|
|
|
- row.id+"&encryption="+res.encryption_string;
|
|
|
- document.getElementById("temporaryLinks").innerHTML = link;
|
|
|
- var doc = document,
|
|
|
- text = doc.getElementById("temporaryLinks"),
|
|
|
- range,
|
|
|
- selection;
|
|
|
- if (doc.body.createTextRange) {
|
|
|
- range = doc.body.createTextRange();
|
|
|
- range.moveToElementText(text);
|
|
|
- range.select();
|
|
|
- } else if (window.getSelection) {
|
|
|
- selection = window.getSelection();
|
|
|
- range = doc.createRange();
|
|
|
- range.selectNodeContents(text);
|
|
|
- selection.removeAllRanges();
|
|
|
- selection.addRange(range);
|
|
|
- }
|
|
|
- document.execCommand("copy");
|
|
|
- this.$message({
|
|
|
- message: "复制成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- window.getSelection().removeAllRanges();
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$message({
|
|
|
- message: "生成失败,请稍后重试",
|
|
|
- type: "warning",
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ message: "生成失败,请稍后重试",
|
|
|
+ type: "warning"
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
// 新建教材
|
|
|
handleAdd() {
|
|
@@ -876,8 +894,11 @@ export default {
|
|
|
} else {
|
|
|
MethodName = "book-book_manager-AddBook";
|
|
|
}
|
|
|
- // this.formDialog.publish_status = 1;
|
|
|
- this.formDialog.publish_status = this.tableData[this.rowIndex].publish_status ? this.tableData[this.rowIndex].publish_status : 0
|
|
|
+ // this.formDialog.publish_status = 1;
|
|
|
+ this.formDialog.publish_status = this.tableData[this.rowIndex]
|
|
|
+ .publish_status
|
|
|
+ ? this.tableData[this.rowIndex].publish_status
|
|
|
+ : 0;
|
|
|
let data = JSON.parse(JSON.stringify(_this.formDialog));
|
|
|
getContent(MethodName, data)
|
|
|
.then(res => {
|
|
@@ -904,31 +925,31 @@ export default {
|
|
|
// 查询数据列表
|
|
|
getList() {
|
|
|
let MethodName = "book-book_manager-PageQueryBookList";
|
|
|
- // let order_column = ""
|
|
|
- // if(this.dataSort != {}){
|
|
|
- // if(this.dataSort.order=='descending'){
|
|
|
- // order_column = this.dataSort.prop + ':desc'
|
|
|
- // }else if(this.dataSort.order=='ascending'){
|
|
|
- // // 升序不传值
|
|
|
- // order_column = this.dataSort.prop
|
|
|
- // }else{
|
|
|
- // order_column = 'create_time:desc'
|
|
|
- // }
|
|
|
- // }else{
|
|
|
- // order_column = 'create_time:desc'
|
|
|
- // }
|
|
|
- let order_column_list = []
|
|
|
- if(this.dataSort != {}){
|
|
|
- if(this.dataSort.order=='descending'){
|
|
|
- order_column_list = [this.dataSort.prop + ':desc']
|
|
|
- }else if(this.dataSort.order=='ascending'){
|
|
|
- // 升序不传值
|
|
|
- order_column_list = [this.dataSort.prop]
|
|
|
- }else{
|
|
|
- order_column_list = ['create_time:desc']
|
|
|
+ // let order_column = ""
|
|
|
+ // if(this.dataSort != {}){
|
|
|
+ // if(this.dataSort.order=='descending'){
|
|
|
+ // order_column = this.dataSort.prop + ':desc'
|
|
|
+ // }else if(this.dataSort.order=='ascending'){
|
|
|
+ // // 升序不传值
|
|
|
+ // order_column = this.dataSort.prop
|
|
|
+ // }else{
|
|
|
+ // order_column = 'create_time:desc'
|
|
|
+ // }
|
|
|
+ // }else{
|
|
|
+ // order_column = 'create_time:desc'
|
|
|
+ // }
|
|
|
+ let order_column_list = [];
|
|
|
+ if (this.dataSort != {}) {
|
|
|
+ if (this.dataSort.order == "descending") {
|
|
|
+ order_column_list = [this.dataSort.prop + ":desc"];
|
|
|
+ } else if (this.dataSort.order == "ascending") {
|
|
|
+ // 升序不传值
|
|
|
+ order_column_list = [this.dataSort.prop];
|
|
|
+ } else {
|
|
|
+ order_column_list = ["create_time:desc"];
|
|
|
}
|
|
|
- }else{
|
|
|
- order_column_list = ['create_time:desc']
|
|
|
+ } else {
|
|
|
+ order_column_list = ["create_time:desc"];
|
|
|
}
|
|
|
let data = {
|
|
|
name: this.form.name,
|
|
@@ -936,7 +957,7 @@ export default {
|
|
|
cur_page: this.currentPage,
|
|
|
org_id: this.form.agency,
|
|
|
// order_column: order_column,
|
|
|
- order_column_list:order_column_list,
|
|
|
+ order_column_list: order_column_list,
|
|
|
publish_status: this.form.publish_status,
|
|
|
is_control_publish_scope: "false",
|
|
|
is_enable_book_org_free_license_query: "false"
|
|
@@ -1384,14 +1405,14 @@ export default {
|
|
|
this.formDialog.description = "";
|
|
|
done();
|
|
|
},
|
|
|
- handleSort(value){
|
|
|
- let dataSort = {
|
|
|
- prop: value.prop,
|
|
|
- order: value.order
|
|
|
- }
|
|
|
- this.dataSort = dataSort
|
|
|
- localStorage.setItem("dataSort", JSON.stringify(dataSort));
|
|
|
- this.getList()
|
|
|
+ handleSort(value) {
|
|
|
+ let dataSort = {
|
|
|
+ prop: value.prop,
|
|
|
+ order: value.order
|
|
|
+ };
|
|
|
+ this.dataSort = dataSort;
|
|
|
+ localStorage.setItem("dataSort", JSON.stringify(dataSort));
|
|
|
+ this.getList();
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -1485,4 +1506,4 @@ export default {
|
|
|
overflow-y: auto;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|