|
@@ -13,8 +13,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="tabs">
|
|
|
- <a :class="[tabsIndex===0?'active':'']" @click="handleChangeTabs(0)">已校对 23</a>
|
|
|
- <a :class="[tabsIndex===1?'active':'']" @click="handleChangeTabs(1)">待校对 </a>
|
|
|
+ <a :class="[tabsIndex===0?'active':'']" @click="handleChangeTabs(0)">已校对 {{checkNumber[1]?checkNumber[1]:''}}</a>
|
|
|
+ <a :class="[tabsIndex===1?'active':'']" @click="handleChangeTabs(1)">待校对 {{checkNumber[0]?checkNumber[0]:''}}</a>
|
|
|
</div>
|
|
|
<div class="search-box">
|
|
|
<div class="search-item">
|
|
@@ -59,135 +59,238 @@
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-table
|
|
|
- class="search-table"
|
|
|
- :data="tableData"
|
|
|
- style="width: 100%"
|
|
|
- @sort-change="handleSort"
|
|
|
- :default-sort = dataSort
|
|
|
- :max-height="tableHeight">
|
|
|
- <el-table-column
|
|
|
- type="index"
|
|
|
- label="#"
|
|
|
- sortable
|
|
|
- width="56">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="iss_name"
|
|
|
- label="名称"
|
|
|
- sortable="custom"
|
|
|
- min-width="226">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="iss_no"
|
|
|
- label="期数"
|
|
|
- width="84"
|
|
|
- sortable="custom">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="study_phase"
|
|
|
- label="学段"
|
|
|
- width="72">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{formatterStudy(scope.row)}}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="status"
|
|
|
- label="状态"
|
|
|
- width="104" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="status-box">
|
|
|
- <span :style="{background:$checkStatusColorList[scope.row.iss_status].bg}"></span>
|
|
|
- <b :style="{color:$checkStatusColorList[scope.row.iss_status].color}">{{$checkStatusColorList[scope.row.iss_status].text}}</b>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="creator_real_name"
|
|
|
- label="创建人"
|
|
|
- width="88"
|
|
|
- sortable="custom">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="create_time"
|
|
|
- label="创建时间"
|
|
|
- width="144"
|
|
|
- sortable="custom">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{scope.row.create_time?scope.row.create_time.substring(0,16):'-'}}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="updater_real_name"
|
|
|
- label="最近编辑"
|
|
|
- min-width="96">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="update_time"
|
|
|
- label="最近编辑时间"
|
|
|
- width="144"
|
|
|
- sortable="custom">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{scope.row.update_time?scope.row.update_time.substring(0,16):'-'}}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- fixed="right"
|
|
|
- label="操作"
|
|
|
- width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- @click.native.prevent="handleEdit(scope.row)"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- class="primary-btn">
|
|
|
- 编辑
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- @click.native.prevent="handleCheck(scope.row, scope.$index)"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- class="primary-btn"
|
|
|
- v-if="scope.row.iss_status===0||scope.row.iss_status===3">
|
|
|
- 审核
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- @click.native.prevent="handleUp(scope.row, scope.$index)"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- class="primary-btn"
|
|
|
- v-if="scope.row.iss_status===1">
|
|
|
- 上架
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- @click.native.prevent="handleUp(scope.row, scope.$index)"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- class="red-btn"
|
|
|
- v-else-if="scope.row.iss_status===2">
|
|
|
- 下架
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- @click.native.prevent="handleDelete(scope.row, scope.$index)"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- class="red-btn">
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="pageNumber"
|
|
|
- :page-sizes="[10, 20, 30, 40]"
|
|
|
- :page-size="pageSize"
|
|
|
- layout="total, prev, pager, next, sizes, jumper"
|
|
|
- :total="total_count">
|
|
|
- </el-pagination>
|
|
|
+ <template v-if="tabsIndex===0">
|
|
|
+ <el-table
|
|
|
+ class="search-table"
|
|
|
+ :data="tableData"
|
|
|
+ style="width: 100%"
|
|
|
+ @sort-change="handleSort"
|
|
|
+ :default-sort = dataSort
|
|
|
+ :max-height="tableHeight"
|
|
|
+ key='checked-table'>
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ label="#"
|
|
|
+ sortable
|
|
|
+ width="56"
|
|
|
+ :index="(pageNumber-1)*pageSize+1">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="iss_name"
|
|
|
+ label="名称"
|
|
|
+ sortable="custom"
|
|
|
+ min-width="226">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="iss_no"
|
|
|
+ label="期数"
|
|
|
+ width="84"
|
|
|
+ sortable="custom">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="study_phase"
|
|
|
+ label="学段"
|
|
|
+ width="72">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{formatterStudy(scope.row)}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="status"
|
|
|
+ label="状态"
|
|
|
+ width="104" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="status-box">
|
|
|
+ <span :style="{background:$checkStatusColorList[scope.row.iss_status].bg}"></span>
|
|
|
+ <b :style="{color:$checkStatusColorList[scope.row.iss_status].color}">{{$checkStatusColorList[scope.row.iss_status].text}}</b>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="creator_real_name"
|
|
|
+ label="创建人"
|
|
|
+ width="88"
|
|
|
+ sortable="custom">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="create_time"
|
|
|
+ label="创建时间"
|
|
|
+ width="144"
|
|
|
+ sortable="custom">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.create_time?scope.row.create_time.substring(0,16):'-'}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="updater_real_name"
|
|
|
+ label="最近编辑"
|
|
|
+ min-width="96">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="update_time"
|
|
|
+ label="最近编辑时间"
|
|
|
+ width="144"
|
|
|
+ sortable="custom">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.update_time?scope.row.update_time.substring(0,16):'-'}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ fixed="right"
|
|
|
+ label="操作"
|
|
|
+ width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleEdit(scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="primary-btn">
|
|
|
+ 编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleCheck(scope.row, scope.$index)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="primary-btn"
|
|
|
+ v-if="scope.row.iss_status===0||scope.row.iss_status===3">
|
|
|
+ 审核
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleUp(scope.row, scope.$index)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="primary-btn"
|
|
|
+ v-if="scope.row.iss_status===1">
|
|
|
+ 上架
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleUp(scope.row, scope.$index)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="red-btn"
|
|
|
+ v-else-if="scope.row.iss_status===2">
|
|
|
+ 下架
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleDelete(scope.row, scope.$index)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="red-btn">
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ @size-change="(val)=>handleSizeChange(val,'pageSize','pageNumber')"
|
|
|
+ @current-change="(val)=>handleCurrentChange(val,'pageNumber')"
|
|
|
+ :current-page="pageNumber"
|
|
|
+ :page-sizes="[10, 20, 30, 40]"
|
|
|
+ :page-size="pageSize"
|
|
|
+ layout="total, prev, pager, next, sizes, jumper"
|
|
|
+ :total="total_count">
|
|
|
+ </el-pagination>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-table
|
|
|
+ class="search-table"
|
|
|
+ :data="tableData"
|
|
|
+ style="width: 100%"
|
|
|
+ @sort-change="handleSort"
|
|
|
+ :default-sort = dataSort
|
|
|
+ :max-height="tableHeight"
|
|
|
+ :key="'check-table'">
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ label="#"
|
|
|
+ sortable
|
|
|
+ width="56"
|
|
|
+ :index="(pageNumbers-1)*pageSizes+1">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="iss_name"
|
|
|
+ label="名称"
|
|
|
+ sortable="custom"
|
|
|
+ min-width="226">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="iss_no"
|
|
|
+ label="期数"
|
|
|
+ width="84"
|
|
|
+ sortable="custom">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="study_phase"
|
|
|
+ label="学段"
|
|
|
+ width="72">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{formatterStudy(scope.row)}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="create_time"
|
|
|
+ label="导入日期"
|
|
|
+ width="144"
|
|
|
+ sortable="custom">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.create_time?scope.row.create_time.substring(0,10):'-'}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="updater_real_name"
|
|
|
+ label="最近编辑"
|
|
|
+ min-width="96">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="update_time"
|
|
|
+ label="最近编辑时间"
|
|
|
+ width="144"
|
|
|
+ sortable="custom">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.update_time?scope.row.update_time.substring(0,16):'-'}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ fixed="right"
|
|
|
+ label="操作"
|
|
|
+ width="190">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleEdits(scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="primary-btn">
|
|
|
+ 校对
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleChecks(scope.row, scope.$index)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="primary-btn">
|
|
|
+ 完成校对
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleDelete(scope.row, scope.$index)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="red-btn">
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ @size-change="(val)=>handleSizeChange(val,'pageSizes','pageNumbers')"
|
|
|
+ @current-change="(val)=>handleCurrentChange(val,'pageNumbers')"
|
|
|
+ :current-page="pageNumbers"
|
|
|
+ :page-sizes="[10, 20, 30, 40]"
|
|
|
+ :page-size="pageSizes"
|
|
|
+ layout="total, prev, pager, next, sizes, jumper"
|
|
|
+ :total="total_count">
|
|
|
+ </el-pagination>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -285,13 +388,17 @@ export default {
|
|
|
tableData:[],
|
|
|
pageSize: window.localStorage.getItem('pageSize')?Number(window.localStorage.getItem('pageSize')):10,
|
|
|
pageNumber: window.localStorage.getItem('pageNumber')?Number(window.localStorage.getItem('pageNumber')):1,
|
|
|
+ pageSizes: window.localStorage.getItem('pageSizes')?Number(window.localStorage.getItem('pageSizes')):10,
|
|
|
+ pageNumbers: window.localStorage.getItem('pageNumbers')?Number(window.localStorage.getItem('pageNumbers')):1,
|
|
|
tableHeight: "", // 表格高度
|
|
|
total_count: 0,
|
|
|
dataSort: {
|
|
|
prop:'update_time',
|
|
|
order: 'descending'
|
|
|
},
|
|
|
- tabsIndex: 0
|
|
|
+ tabsIndex: window.localStorage.getItem('tabsIndex')?Number(window.localStorage.getItem('tabsIndex'))*1:0,
|
|
|
+ check_flag: window.localStorage.getItem('tabsIndex')?Number(window.localStorage.getItem('tabsIndex'))*1===1?false:true:true,
|
|
|
+ checkNumber: [0,0]
|
|
|
}
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
@@ -313,9 +420,9 @@ export default {
|
|
|
handleChangeTabs(value){
|
|
|
this.tabsIndex = value
|
|
|
if(value===1){
|
|
|
- this.searchStatus = 9
|
|
|
+ this.check_flag = false
|
|
|
}else{
|
|
|
- this.searchStatus = null
|
|
|
+ this.check_flag = true
|
|
|
}
|
|
|
// this.pageNumber = 1
|
|
|
this.getList()
|
|
@@ -342,11 +449,30 @@ export default {
|
|
|
// 点击时记录页码和每页条数
|
|
|
window.localStorage.setItem('pageSize',this.pageSize)
|
|
|
window.localStorage.setItem('pageNumber',this.pageNumber)
|
|
|
+ window.localStorage.setItem('tabsIndex',this.tabsIndex)
|
|
|
window.localStorage.removeItem('newsForm')
|
|
|
window.localStorage.removeItem('newsStep')
|
|
|
this.$router.push({
|
|
|
path: "/createNewspaper",
|
|
|
query: {
|
|
|
+ id: row?row.id:'',
|
|
|
+ isCreate: !row?'true':'false'
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 校对报刊
|
|
|
+ handleEdits(row){
|
|
|
+ // 根据登录用户判断当前用户是不是超管 在table里加上disabled
|
|
|
+
|
|
|
+ // 点击时记录页码和每页条数
|
|
|
+ window.localStorage.setItem('pageSizes',this.pageSizes)
|
|
|
+ window.localStorage.setItem('pageNumbers',this.pageNumbers)
|
|
|
+ window.localStorage.setItem('tabsIndex',this.tabsIndex)
|
|
|
+ window.localStorage.removeItem('newsForm')
|
|
|
+ window.localStorage.removeItem('newsStep')
|
|
|
+ this.$router.push({
|
|
|
+ path: "/articleChecklist",
|
|
|
+ query: {
|
|
|
id: row?row.id:''
|
|
|
},
|
|
|
});
|
|
@@ -368,7 +494,7 @@ export default {
|
|
|
}
|
|
|
getLogin(Mname, data).then(res => {
|
|
|
this.$message.success("操作成功");
|
|
|
- this.$set(this.tableData, index, updataData);
|
|
|
+ this.getList()
|
|
|
});
|
|
|
},
|
|
|
// 审核
|
|
@@ -387,17 +513,39 @@ export default {
|
|
|
updataData.iss_status = 1;
|
|
|
getLogin(Mname, data).then(res => {
|
|
|
this.$message.success("操作成功");
|
|
|
- this.$set(this.tableData, index, updataData);
|
|
|
+ this.getList()
|
|
|
});
|
|
|
}).catch(() => {
|
|
|
data.iss_status = 3;
|
|
|
updataData.iss_status = 3;
|
|
|
getLogin(Mname, data).then(res => {
|
|
|
this.$message.success("操作成功");
|
|
|
- this.$set(this.tableData, index, updataData);
|
|
|
+ this.getList()
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ // 审核
|
|
|
+ handleChecks(row, index){
|
|
|
+ let Mname = "/PaperServer/Manager/IssueManager/EditIssueStatus";
|
|
|
+ let updataData = JSON.parse(JSON.stringify(row));
|
|
|
+ let data = {
|
|
|
+ id: row.id
|
|
|
+ };
|
|
|
+ this.$confirm('确定完成校对吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ data.iss_status = 0;
|
|
|
+ updataData.iss_status = 0;
|
|
|
+ getLogin(Mname, data).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getList()
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
// 删除
|
|
|
handleDelete(row){
|
|
|
this.$confirm('确定删除吗?', '提示', {
|
|
@@ -420,18 +568,18 @@ export default {
|
|
|
|
|
|
});
|
|
|
},
|
|
|
- handleSizeChange(val) {
|
|
|
- this.pageSize = val
|
|
|
- this.pageNumber = 1
|
|
|
+ handleSizeChange(val,type,page) {
|
|
|
+ this[type] = val
|
|
|
+ this[page] = 1
|
|
|
this.getList()
|
|
|
},
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.pageNumber = val
|
|
|
+ handleCurrentChange(val,type) {
|
|
|
+ this[type] = val
|
|
|
this.getList()
|
|
|
},
|
|
|
//计算table高度(动态设置table高度)
|
|
|
getTableHeight() {
|
|
|
- let tableH = 370; //距离页面下方的高度
|
|
|
+ let tableH = 420; //距离页面下方的高度
|
|
|
let tableHeightDetil = window.innerHeight - tableH;
|
|
|
if (tableHeightDetil <= 300) {
|
|
|
this.tableHeight = 300;
|
|
@@ -475,7 +623,8 @@ export default {
|
|
|
release_year: this.searchYear===-1?null:this.searchYear,
|
|
|
page_capacity:this.pageSize,
|
|
|
cur_page:this.pageNumber,
|
|
|
- order_bys: order_column_list
|
|
|
+ order_bys: order_column_list,
|
|
|
+ check_flag: this.check_flag
|
|
|
}
|
|
|
getLogin(MethodName, data)
|
|
|
.then((res) => {
|
|
@@ -515,10 +664,23 @@ export default {
|
|
|
this.loading = false
|
|
|
});
|
|
|
|
|
|
+ },
|
|
|
+ // 获取数目
|
|
|
+ getNumberData(){
|
|
|
+ getLogin('/PaperServer/Manager/IssueManager/FindNotCheckAndCheckedIssCount', {})
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ this.checkNumber = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
+ this.getNumberData()
|
|
|
this.getYearList()
|
|
|
this.getTableHeight();
|
|
|
this.getList()
|