|
@@ -72,85 +72,89 @@
|
|
|
</el-form>
|
|
|
<div class="table-box">
|
|
|
<el-table
|
|
|
+ v-loading="tableloading"
|
|
|
:data="tableData"
|
|
|
style="width: 100%"
|
|
|
- v-loading="tableloading"
|
|
|
+ @sort-change="handleSort"
|
|
|
+ :default-sort="dataSort"
|
|
|
>
|
|
|
<el-table-column
|
|
|
class="table-firstC"
|
|
|
label="名称"
|
|
|
prop="name"
|
|
|
width="150"
|
|
|
- ></el-table-column>
|
|
|
+ sortable="custom"
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
label="英文名"
|
|
|
prop="name_english"
|
|
|
width="150"
|
|
|
- ></el-table-column>
|
|
|
+ sortable="custom"
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
label="作者"
|
|
|
prop="author"
|
|
|
width="100"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="版本"
|
|
|
- prop="edition"
|
|
|
- width="100"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="出版社"
|
|
|
- prop="publisher"
|
|
|
- width="150"
|
|
|
- ></el-table-column>
|
|
|
+ sortable="custom"
|
|
|
+ />
|
|
|
+ <el-table-column label="版本" prop="edition" width="100" />
|
|
|
+ <el-table-column label="出版社" prop="publisher" width="150" />
|
|
|
<el-table-column
|
|
|
label="出版编号"
|
|
|
prop="publish_number"
|
|
|
width="100"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="所属机构"
|
|
|
- prop="org_name"
|
|
|
- width="150"
|
|
|
- ></el-table-column>
|
|
|
+ />
|
|
|
+ <el-table-column label="所属机构" prop="org_name" width="150" />
|
|
|
<el-table-column
|
|
|
:formatter="handleStatus"
|
|
|
label="发布状态"
|
|
|
prop="publish_status"
|
|
|
width="100"
|
|
|
- ></el-table-column>
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="课件模板"
|
|
|
+ prop="courseware_category_name"
|
|
|
+ width="100"
|
|
|
+ />
|
|
|
<!-- <el-table-column
|
|
|
:formatter="handleScope"
|
|
|
label="发布范围"
|
|
|
prop="publish_scope"
|
|
|
width="100"
|
|
|
- ></el-table-column> -->
|
|
|
+ /> -->
|
|
|
+ <el-table-column
|
|
|
+ label="创建时间"
|
|
|
+ prop="create_time"
|
|
|
+ width="170"
|
|
|
+ sortable="custom"
|
|
|
+ />
|
|
|
<el-table-column fixed="right" label="操作" prop width="370">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button @click="handleClick(scope.row)" type="text"
|
|
|
+ <el-button type="text" @click="handleClick(scope.row)"
|
|
|
>编辑</el-button
|
|
|
>
|
|
|
- <el-button @click="handleView(scope.row)" type="text"
|
|
|
+ <el-button type="text" @click="handleView(scope.row)"
|
|
|
>预览</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
- @click="handleUp(scope.row, scope.$index)"
|
|
|
type="text"
|
|
|
+ @click="handleUp(scope.row, scope.$index)"
|
|
|
>{{
|
|
|
scope.row.publish_status === 0 ? "上架" : "下架"
|
|
|
}}</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
- @click="handleEdit(scope.row, scope.$index)"
|
|
|
type="text"
|
|
|
+ @click="handleEdit(scope.row, scope.$index)"
|
|
|
>教材信息</el-button
|
|
|
>
|
|
|
- <el-button @click="handleDiscount(scope.row)" type="text"
|
|
|
- >激活码</el-button
|
|
|
+ <el-button type="text" @click="handleDiscount(scope.row)"
|
|
|
+ >授权码</el-button
|
|
|
>
|
|
|
<el-button type="text" @click="handleCreatLink(scope.row)"
|
|
|
>生成链接</el-button
|
|
|
>
|
|
|
- <el-button @click="handleDel(scope.row)" type="text"
|
|
|
+ <el-button type="text" @click="handleDel(scope.row)"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -334,13 +338,29 @@
|
|
|
>
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="主题颜色" label-width="90px" prop="theme_color">
|
|
|
- <el-radio v-model="formDialog.theme_color" label="red">红色</el-radio>
|
|
|
- <el-radio v-model="formDialog.theme_color" label="green"
|
|
|
- >绿色</el-radio
|
|
|
+ <el-radio
|
|
|
+ v-for="(item, index) in themeColorList"
|
|
|
+ :key="'themeColor' + index"
|
|
|
+ v-model="formDialog.theme_color"
|
|
|
+ :label="item.value"
|
|
|
>
|
|
|
- <el-radio v-model="formDialog.theme_color" label="brown"
|
|
|
- >棕色</el-radio
|
|
|
+ {{ item.name }}
|
|
|
+ </el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="课件模板"
|
|
|
+ label-width="90px"
|
|
|
+ prop="courseware_category"
|
|
|
+ >
|
|
|
+ <el-radio
|
|
|
+ v-for="(item, index) in coursewareList"
|
|
|
+ :key="'themeColor' + index"
|
|
|
+ v-model="formDialog.courseware_category"
|
|
|
+ :label="item.value"
|
|
|
+ :disabled="titleEdit === '编辑教材'"
|
|
|
>
|
|
|
+ {{ item.name }}
|
|
|
+ </el-radio>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="教材图片" label-width="90px" prop="fileList">
|
|
|
<el-upload
|
|
@@ -378,6 +398,7 @@ import Nav from "@/components/inputModules/common/Nav";
|
|
|
import { getContent, getContentFile, TextbookAPI } from "@/api/ajax";
|
|
|
import Cookies from "js-cookie";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
+import commonjs from "@/components/Adult/commonjs";
|
|
|
|
|
|
export default {
|
|
|
name: "courselist",
|
|
@@ -401,6 +422,17 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
+ themeColorList: [],
|
|
|
+ coursewareList: [
|
|
|
+ {
|
|
|
+ value: "NPC",
|
|
|
+ name: "新标准汉语",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "RLC",
|
|
|
+ name: "轻松学中文",
|
|
|
+ },
|
|
|
+ ], // 课件类型
|
|
|
tableData: [], // 数据内容
|
|
|
currentPage: 1, // 当前页码
|
|
|
page_capacity: 10, // 每页条数
|
|
@@ -438,6 +470,8 @@ export default {
|
|
|
theme_color: "",
|
|
|
type_name_list: [],
|
|
|
type_id: "",
|
|
|
+ courseware_category: "NPC",
|
|
|
+ create_time: "",
|
|
|
},
|
|
|
agencyList: [
|
|
|
{
|
|
@@ -506,9 +540,13 @@ export default {
|
|
|
],
|
|
|
diaMyOrgList: [],
|
|
|
typeList: [],
|
|
|
+ dataSort: localStorage.getItem("dataSort")
|
|
|
+ ? JSON.parse(localStorage.getItem("dataSort"))
|
|
|
+ : {},
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.themeColorList = commonjs.themeColorList;
|
|
|
this.getList();
|
|
|
this.getTypeList();
|
|
|
this.getMyOrgList();
|
|
@@ -673,6 +711,8 @@ export default {
|
|
|
theme_color: "",
|
|
|
type_id: "",
|
|
|
type_name_list: [],
|
|
|
+ courseware_category: "NPC",
|
|
|
+ create_time: "",
|
|
|
};
|
|
|
this.agency = "";
|
|
|
this.fileList = [];
|
|
@@ -747,12 +787,25 @@ export default {
|
|
|
// 查询数据列表
|
|
|
getList() {
|
|
|
let MethodName = "book-book_manager-PageQueryBookList";
|
|
|
+ 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"];
|
|
|
+ }
|
|
|
let data = {
|
|
|
name: this.form.name.trim(),
|
|
|
page_capacity: this.page_capacity,
|
|
|
cur_page: this.currentPage,
|
|
|
org_id: this.form.agency,
|
|
|
- order_column: "create_time:desc",
|
|
|
+ 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",
|
|
@@ -930,6 +983,8 @@ export default {
|
|
|
theme_color: res.theme_color,
|
|
|
type_id: res.type_id,
|
|
|
type_name_list: res.type_name_list,
|
|
|
+ courseware_category: res.courseware_category,
|
|
|
+ create_time: res.create_time,
|
|
|
};
|
|
|
if (res.picture_url) {
|
|
|
let obj = {
|
|
@@ -1013,6 +1068,15 @@ export default {
|
|
|
this.formDialog.type_name_list = [];
|
|
|
done();
|
|
|
},
|
|
|
+ handleSort(value) {
|
|
|
+ let dataSort = {
|
|
|
+ prop: value.prop,
|
|
|
+ order: value.order,
|
|
|
+ };
|
|
|
+ this.dataSort = dataSort;
|
|
|
+ localStorage.setItem("dataSort", JSON.stringify(dataSort));
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|