You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

338 lines
13 KiB

3 months ago
<template>
<div class="main-content12 recharge-wrap">
<div class="flex-common">
<el-form class="">
<div class="flex-between mb24">
3 months ago
<div class="flex filter-area">
<label for="">收录申请</label>
1 month ago
<GuipSelect width="180px" clearable label="状态" :options="statusList" :extraItem="{ label: '不限', value: -1 }" v-model="review_status" @change="getList"/>
<GuipSelect width="180px" clearable label="学历" :options="degreesList" v-model="degree" @change="getList"/>
<GuipFormItem label="学校">
<SchoolAutoComplete
slot="formDom"
v-model="schoolName"
:selected-school-id="school"
@select="handleSchoolSelect"
@clear="handleSchoolClear"
placeholder="请输入学校名称"
style="width: 300px;"
/>
</GuipFormItem>
3 months ago
</div>
<GuipButton type="primary" :btnstyle="{ width: '120px' }">收录成功通知
</GuipButton>
</div>
3 months ago
<GuipTable :tableData="tableList" :key="tableKey" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1">
<template>
<el-table-column fixed="left" prop="school_name" label="学校" min-width="200"></el-table-column>
<el-table-column prop="degree_name" label="学历" min-width="200"></el-table-column>
<el-table-column prop="college_name" label="学院" min-width="200"></el-table-column>
<el-table-column prop="phone" label="反馈用户手机号" min-width="200"></el-table-column>
<el-table-column prop="review_status_desc" label="要求" min-width="200">
<template slot-scope="scope">
<svg-icon :path="require('@/assets/register/tableEdit.svg')" :color="'#8A9099'" @click="handleLunwen(scope.row.status)"
:hoverColor="'#006AFF'" />
</template>
</el-table-column>
<el-table-column prop="review_status_desc" label="论文" min-width="200">
<template slot-scope="scope">
<SvgIcon :path="require('@/assets/register/tableEdit.svg')" @click="handleLunwen(scope.row.status)" :color="'#8A9099'"
:hoverColor="'#006AFF'" />
</template>
</el-table-column>
3 months ago
<el-table-column prop="review_status_desc" label="上传时间" min-width="200"></el-table-column>
<el-table-column prop="status" label="状态" min-width="200">
<template slot-scope="scope">
1 month ago
<span :class="['status','status'+[scope.row.review_status]]">{{ scope.row.review_status_desc }}</span>
</template>
</el-table-column>
3 months ago
<el-table-column fixed="right" prop="tid" label="操作" min-width="100">
<template slot-scope="scope">
<div class="flex">
<GuipButton v-if="scope.row.review_status == 0" type="text" @click="handleConfirm(scope.row.id,'1')">收录</GuipButton>
<GuipButton v-if="scope.row.review_status == 3" type="text" @click="handleConfirm(scope.row.id,'0')">恢复代收录</GuipButton>
<GuipButton v-if="scope.row.review_status == 1" type="text" @click="handleUpdate(scope.row.id)">收录</GuipButton>
<GuipButton v-if="scope.row.review_status==2" type="text" @click="handleUpdate(scope.row)">修改</GuipButton>
1 month ago
<GuipButton v-if="scope.row.review_status == 0" type="warn" @click="handleRefuse(scope.row)">拒绝</GuipButton>
<GuipButton v-if="scope.row.review_status == 1" type="warn" @click="handleConfirm(scope.row.id,'0')">取消</GuipButton>
3 months ago
</div>
</template>
</el-table-column>
</template>
</GuipTable>
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
:total="parseInt(total)">
</el-pagination>
</el-form>
</div>
2 months ago
<GuipDialog :dialogVisible="isShowDialog" title="拒绝收录原因" :show-close-button="false"
3 months ago
:show-cancel-button="true" @confirm="handleConfirmRefuse" @cancel="handleCancelRefuse">
<!-- 自定义内容 -->
<el-form>
<p style="margin-bottom: 14px">{{'拒绝收录'+tpl_name+'模板'}}</p>
<GuipTextarea :styleObject="{ width: '450px' }" placeholder="说明原因,发送短信给用户手机" autosize v-model="refuse_reason" />
3 months ago
</el-form>
</GuipDialog>
</div>
</template>
<script>
import SvgIcon from '@/components/SvgIcon.vue';
3 months ago
import GuipButton from "@/components/GuipButton.vue";
import GuipTable from "@/components/GuipTable.vue";
import GuipSelect from "@/components/GuipSelect.vue";
// import GuipInput from "@/components/GuipInput.vue";
3 months ago
import GuipDialog from "@/components/GuipDialog.vue";
import GuipTextarea from "@/components/GuipTextarea.vue";
import SchoolAutoComplete from '@/components/clientSet/searchInput.vue'; // 引入公共组件
import GuipFormItem from '@/components/GuipFormItem.vue'
3 months ago
// 假设一下状态
// status:{
// 0:'待收录',
// 1:'已收录',
// 2:'收录中',
// 3:'不收录'
// }
3 months ago
export default {
components: {
GuipTextarea,
GuipDialog,
// GuipInput,
GuipSelect,
3 months ago
GuipTable,
GuipButton,
SvgIcon,
SchoolAutoComplete,
GuipFormItem
3 months ago
},
options: { styleIsolation: "shared" },
data() {
return {
tableLoading:false,
tableKey: '',
1 month ago
school:'',
schoolName:'',
lastSearchKeyword:'',
1 month ago
degree:'',
3 months ago
review_status: -1,
tableList:[],
3 months ago
currentPage: 1, //当前页
pageSize: 20, //每页的容量
total: 0, //列表总数
isShowDialog:false,
refuse_id:0,
tpl_name:'',
1 month ago
refuse_reason:'',
statusList:[],
degreesList:[]
3 months ago
}
},
watch: {
schoolName(newVal) {
// 如果手动清空了输入框,也清空选中的学校
if (!newVal) {
this.school = null;
this.lastSearchKeyword = '';
this.$emit('clear');
}
}
},
3 months ago
mounted() {
this.$nextTick(()=>{
this.init()
3 months ago
})
},
methods: {
init(){
this.tableList = []
this.total = 0
this.total_money = 0
this.currentPage = 1
this.pageSize = 20
this.getList()
1 month ago
this.getStatusList()
this.getDegreesList()
3 months ago
},
handleSchoolSelect(item) {
console.log('选中学校:', item);
this.school = item.id;
this.schoolName = item.name;
this.getList();
},
handleSchoolClear() {
console.log('学校选择已清空');
this.school = '';
this.schoolName = '';
this.getList();
},
3 months ago
getList() {
try {
this.$http('POST', '/supernew/ajax_get_paiban_review_list', {//ok
1 month ago
school: this.school || '0',
degree: this.degree || '0',
review_status: String(this.review_status),
3 months ago
page: this.currentPage,
}).then(response => {
this.$nextTick(() => {
1 month ago
this.tableList = response.data.list
3 months ago
this.total = response.data.count
})
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
}
},
getDegreesList() {
try {
this.$http('POST', '/supernew/ajax_get_paiban_degrees', {
}).then(response => {
this.$nextTick(() => {
this.degreesList = response.data
})
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
}
},
1 month ago
getStatusList() {
try {
this.$http('POST', '/supernew/ajax_get_review_status', {
}).then(response => {
this.$nextTick(() => {
this.statusList = response.data
})
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
}
},
3 months ago
handleSizeChange(val) {
this.pageSize = val
this.getList()
},
handleCurrentChange(val) {
this.currentPage = val
this.getList()
},
handleConfirm(id,status){
3 months ago
this.isShowDialog = false
try {
this.$http('POST', '/supernew/ajax_update_paiban_template_review_status', {
template_id: id,
review_status: status,
1 month ago
refuse_reason:this.refuse_reason
3 months ago
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
this.getList()
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
}
},
1 month ago
handleUpdate(row){
// 修改 会到编辑页面
localStorage.setItem('curtplInfo', JSON.stringify(row))
this.$router.push({
path: '/super/clientSet/coverInfoPage',
query: { id:row.id }
})
},
handleLunwen(row){
this.refuse_id = row.id
},
3 months ago
handleRefuse(row){
this.isShowDialog = true
this.refuse_id = row.id
this.tpl_name += row.school_name
if(row.degree_name) this.tpl_name += '-'+row.degree_name
if(row.college_name) this.tpl_name += '-'+row.college_name
// this.handleConfirm(row,status)
3 months ago
},
handleCancelRefuse(){
this.isShowDialog = false
},
handleConfirmRefuse(){
this.handleConfirm(this.refuse_id,'')
3 months ago
},
}
}
</script>
<style lang="scss" scoped>
// 山药 茯苓 薏米 芡实 桔梗 益智仁
.status{
width: 65px;
height: 22px;
display: flex;
justify-content: center;
align-items: center;
padding: 2px 10px;
border-radius: 4px;
background: #F6F7FA;
box-sizing: border-box;
border: 1px solid #DFE2E6;
letter-spacing: 0.08em;
box-sizing: border-box;
color: #626573;
}
.status0{
border: 1px solid #BFDAFF;
background: #F2F7FF;
color: #006AFF;
}
1 month ago
.status2{
border: 1px solid #DFE2E6;
background: #F6F7FA;
color: #626573;
}
1 month ago
.status1{
background: #FFFBF2;
border: 1px solid rgba(251, 131, 45, 0.38);
color: #FB832D;
}
.status3{
border: 1px solid #FFA39E;
background: #FFF1F0;
color: #FF4D4F;
}
3 months ago
::v-deep .el-form-item{
margin: 0;
}
::v-deep .el-form-item__label{
// margin-bottom: 12px;
3 months ago
}
.filter-area{
gap: 32px;
label{
letter-spacing: 0.08em;
font-size: 14px;
font-weight: bold;
line-height: normal;
color: #1E2226;
}
}
</style>