提交 e2247469 authored 作者: Yroc's avatar Yroc

'按钮异常修复'

上级 a03a374b
...@@ -75,20 +75,6 @@ ...@@ -75,20 +75,6 @@
width="320" width="320"
trigger="hover" trigger="hover"
> >
<!-- <el-table height="400" :data="examination_questions_select_data">
<el-table-column
align="center"
prop="name"
label="每道题得分选择"
>
</el-table-column>
<el-table-column align="center" label="操作" width="100">
<template slot-scope="scope">
>
</template>
</el-table-column>
</el-table> -->
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<el-input <el-input
......
...@@ -241,7 +241,7 @@ export default { ...@@ -241,7 +241,7 @@ export default {
btnClick(val) { btnClick(val) {
console.log('右侧按钮'); console.log('右侧按钮');
console.log(val); console.log(val);
if (val == 'add') this.addTobaccoInfo(); if (val.val == 'add') this.addTobaccoInfo();
}, },
init() { init() {
......
...@@ -3,18 +3,36 @@ ...@@ -3,18 +3,36 @@
* @Author: AnthonyD * @Author: AnthonyD
* @Date: 2023-03-28 10:34:24 * @Date: 2023-03-28 10:34:24
* @Last Modified by: AnthonyD * @Last Modified by: AnthonyD
* @Last Modified time: 2023-04-20 15:41:25 * @Last Modified time: 2023-04-21 13:59:01
*/ */
</script> </script>
<template> <template>
<div class="module_container"> <div class="module_container">
<div class="card_container"> <div class="card_container">
<el-card class="box-card"> <el-card class="box-card">
<table-head :head_data="head_data" @search="searchEvent" @resetting="resetting" @btnClick="btnClick"></table-head> <table-head
:head_data="head_data"
@search="searchEvent"
@resetting="resetting"
@btnClick="btnClick"
></table-head>
<div class="table_container"> <div class="table_container">
<el-table v-loading="is_loading" :data="tableData" style="width: 100%;margin-bottom: 20px;" height="650"> <el-table
<el-table-column prop="id" label="编号" width="50"></el-table-column> v-loading="is_loading"
<el-table-column prop="found_user.name" label="题目名称" width="180"> :data="tableData"
style="width: 100%; margin-bottom: 20px"
height="650"
>
<el-table-column
prop="id"
label="编号"
width="50"
></el-table-column>
<el-table-column
prop="found_user.name"
label="题目名称"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <div v-if="(changeReviewContent(scope.row.review_content)).length > 1"> <!-- <div v-if="(changeReviewContent(scope.row.review_content)).length > 1">
<el-popover placement="right" title="多个标题" width="200" trigger="hover"> <el-popover placement="right" title="多个标题" width="200" trigger="hover">
...@@ -28,46 +46,98 @@ ...@@ -28,46 +46,98 @@
<div v-else-if="(changeReviewContent(scope.row.review_content)).length == 1">{{ <div v-else-if="(changeReviewContent(scope.row.review_content)).length == 1">{{
(changeReviewContent(scope.row.review_content))[0] }}</div> (changeReviewContent(scope.row.review_content))[0] }}</div>
<div v-else>暂无...</div> --> <div v-else>暂无...</div> -->
<div v-for="(item, index) in scope.row.examination_questions" :key="index"> <div
v-for="(item, index) in scope.row.examination_questions"
:key="index"
>
{{ item.title }} {{ item.title }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="found_user.name" label="创建人" width="90"></el-table-column> <el-table-column
<el-table-column prop="found_remark" label="创建备注"></el-table-column> prop="found_user.name"
<el-table-column prop="auditor_user.name" label="审核人" width="90"></el-table-column> label="创建人"
<el-table-column prop="release_date" label="发布日期"></el-table-column> width="90"
<el-table-column prop="created_at" label="创建时间"></el-table-column> ></el-table-column>
<el-table-column
prop="found_remark"
label="创建备注"
></el-table-column>
<el-table-column
prop="auditor_user.name"
label="审核人"
width="90"
></el-table-column>
<el-table-column
prop="release_date"
label="发布日期"
></el-table-column>
<el-table-column
prop="created_at"
label="创建时间"
></el-table-column>
<el-table-column prop="remarks" label="备注"></el-table-column> <el-table-column prop="remarks" label="备注"></el-table-column>
<el-table-column prop="status" label="状态" width="90"> <el-table-column prop="status" label="状态" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.status == 1" type="success">批阅完成</el-tag> <el-tag v-if="scope.row.status == 1" type="success"
<el-tag v-if="scope.row.status == 2" type="success">审核通过</el-tag> >批阅完成</el-tag
<el-tag v-if="scope.row.status == 3" type="danger">撤销发布</el-tag> >
<el-tag v-if="scope.row.status == 2" type="success"
>审核通过</el-tag
>
<el-tag v-if="scope.row.status == 3" type="danger"
>撤销发布</el-tag
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" style="color: #000;" @click="toDetail(scope.row)">详情</el-button> <el-button
<el-button size="mini" type="text" style="color: #000;" size="mini"
@click="updateInformation(scope.row)">编辑</el-button> type="text"
<el-button size="mini" type="text" style="color: #F56C6C;" style="color: #000"
@click="deleteInformation(scope.row)">删除</el-button> @click="toDetail(scope.row)"
>详情</el-button
>
<el-button
size="mini"
type="text"
style="color: #000"
@click="updateInformation(scope.row)"
>编辑</el-button
>
<el-button
size="mini"
type="text"
style="color: #f56c6c"
@click="deleteInformation(scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div style="text-align: right;"> <div style="text-align: right">
<el-pagination @current-change="handleCurrentChange" :current-page.sync="request_params.page" <el-pagination
:page-size="request_params.limit" layout="total, prev, pager, next" :total="request_params.total"> @current-change="handleCurrentChange"
:current-page.sync="request_params.page"
:page-size="request_params.limit"
layout="total, prev, pager, next"
:total="request_params.total"
>
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
</div> </div>
<el-dialog :title="is_updata_type == 'add' ? '新增' : '修改'" :visible.sync="is_dialogVisible" width="500px" <el-dialog
:before-close="handleClose" :close-on-click-modal="false"> :title="is_updata_type == 'add' ? '新增' : '修改'"
:visible.sync="is_dialogVisible"
width="500px"
:before-close="handleClose"
:close-on-click-modal="false"
>
<div> <div>
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item label="状态"> <el-form-item label="状态">
...@@ -84,7 +154,12 @@ ...@@ -84,7 +154,12 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="detailed_information.remarks"> <el-input
type="textarea"
:rows="2"
placeholder="请输入内容"
v-model="detailed_information.remarks"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -99,13 +174,25 @@ ...@@ -99,13 +174,25 @@
<script> <script>
import TableHead from '@/components/TableHead/index'; import TableHead from '@/components/TableHead/index';
import { get_student_list, add_student, delete_student, updat_student, get_student_detail, download_student_info, upload_student_info } from '@/api/student'; import {
get_student_list,
add_student,
delete_student,
updat_student,
get_student_detail,
download_student_info,
upload_student_info,
} from '@/api/student';
import { get_read_over_list, updata_read_over, delete_read_over } from '@/api/student'; import {
get_read_over_list,
updata_read_over,
delete_read_over,
} from '@/api/student';
const standard_template = { const standard_template = {
status: null, status: null,
remarks: null, remarks: null,
} };
export default { export default {
data() { data() {
return { return {
...@@ -113,7 +200,7 @@ export default { ...@@ -113,7 +200,7 @@ export default {
//头部按钮 //头部按钮
head_data: { head_data: {
is_search_show: true, is_search_show: true,
search_placeholder: "", search_placeholder: '',
right_buttons: [ right_buttons: [
// { // {
// text: '新增', // text: '新增',
...@@ -144,7 +231,7 @@ export default { ...@@ -144,7 +231,7 @@ export default {
computed: {}, computed: {},
mounted() { mounted() {
this.init() this.init();
}, },
methods: { methods: {
...@@ -157,8 +244,7 @@ export default { ...@@ -157,8 +244,7 @@ export default {
this.getListData(); this.getListData();
}, },
btnClick(val) { btnClick(val) {
if (val == 'add') this.addInformation(); if (val.val == 'add') this.addInformation();
}, },
init() { init() {
...@@ -174,34 +260,33 @@ export default { ...@@ -174,34 +260,33 @@ export default {
console.log('提交'); console.log('提交');
//updata_read_over //updata_read_over
if (this.is_updata_type == 'add') { if (this.is_updata_type == 'add') {
} else { } else {
let id = this.detailed_information.id; let id = this.detailed_information.id;
let data = this.$removeProperty({ let data = this.$removeProperty({
status: this.detailed_information.status, status: this.detailed_information.status,
remarks: this.detailed_information.remarks, remarks: this.detailed_information.remarks,
}); });
updata_read_over(id, data).then(res => { updata_read_over(id, data).then((res) => {
console.log('修改'); console.log('修改');
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
this.is_dialogVisible = false; this.is_dialogVisible = false;
this.init(); this.init();
} }
}) });
} }
}, },
//获取列表数据 //获取列表数据
getListData() { getListData() {
let params = this.$removeProperty(this.request_params); let params = this.$removeProperty(this.request_params);
this.is_loading = true; this.is_loading = true;
get_read_over_list(params).then(res => { get_read_over_list(params).then((res) => {
console.log('列表数据'); console.log('列表数据');
console.log(res); console.log(res);
this.tableData = res.data || []; this.tableData = res.data || [];
this.request_params.total = res.total; this.request_params.total = res.total;
this.is_loading = false; this.is_loading = false;
}) });
}, },
//分页 //分页
handleCurrentChange(val) { handleCurrentChange(val) {
...@@ -228,18 +313,20 @@ export default { ...@@ -228,18 +313,20 @@ export default {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning',
}).then(() => { })
delete_read_over(id).then(res => { .then(() => {
delete_read_over(id).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success(res.message); this.$message.success(res.message);
this.init(); this.init();
} }
});
}) })
}).catch(() => { .catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消删除' message: '已取消删除',
}); });
}); });
}, },
...@@ -249,8 +336,8 @@ export default { ...@@ -249,8 +336,8 @@ export default {
let id = item.id; let id = item.id;
this.$router.push({ this.$router.push({
path: '/student/display_board_detail', path: '/student/display_board_detail',
query: { id: id } query: { id: id },
}) });
}, },
//试题列表 //试题列表
...@@ -263,9 +350,7 @@ export default { ...@@ -263,9 +350,7 @@ export default {
return []; return [];
} }
}, },
}, },
} };
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: AnthonyD * @Author: AnthonyD
* @Date: 2023-03-28 10:34:24 * @Date: 2023-03-28 10:34:24
* @Last Modified by: AnthonyD * @Last Modified by: AnthonyD
* @Last Modified time: 2023-04-20 15:34:11 * @Last Modified time: 2023-04-21 13:49:45
*/ */
</script> </script>
<template> <template>
...@@ -305,11 +305,12 @@ export default { ...@@ -305,11 +305,12 @@ export default {
btnClick(val) { btnClick(val) {
// console.log('右侧按钮'); // console.log('右侧按钮');
// console.log(val); // console.log(val);
if (val == 'add') this.addInformation();
if (val.val == 'add') this.addInformation();
if (val.val == 'template_download') this.templateDownload(val.data); if (val.val == 'template_download') this.templateDownload(val.data);
/* pictureBatchUpload */ /* pictureBatchUpload */
if (val == 'batch_upload') this.pictureBatchUpload(); if (val.val == 'batch_upload') this.pictureBatchUpload();
if (val == 'examination_download') this.createAnswerCard(); if (val.val == 'examination_download') this.createAnswerCard();
if (val.val == 'select_score') this.selectScoreData(val.data); if (val.val == 'select_score') this.selectScoreData(val.data);
}, },
...@@ -553,10 +554,11 @@ export default { ...@@ -553,10 +554,11 @@ export default {
}, },
//试题下载 //试题下载
createAnswerCard() { createAnswerCard() {
console.log('11111');
let id = this.examination_questions_id; let id = this.examination_questions_id;
create_answer_card(id).then((res) => { create_answer_card(id).then((res) => {
// console.log('下载答题卡回调'); console.log('下载答题卡回调');
// console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
let s = res.message.split('='); let s = res.message.split('=');
let name = s[s.length - 1]; let name = s[s.length - 1];
...@@ -567,7 +569,9 @@ export default { ...@@ -567,7 +569,9 @@ export default {
}, },
//得分选择 //得分选择
selectScoreData(val) { selectScoreData(val) {
console.log(val);
let amendData = this.$handleParams({ fraction: val }); let amendData = this.$handleParams({ fraction: val });
let id = this.examination_questions_id; let id = this.examination_questions_id;
console.log(amendData); console.log(amendData);
console.log(id); console.log(id);
......
<script>
/**
* @Author: AnthonyD
* @Date: 2023-03-28 10:34:24
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-04-21 13:45:13
*/
</script>
<template> <template>
<div class="module_container"> <div class="module_container">
<div class="card_container"> <div class="card_container">
...@@ -282,8 +289,8 @@ export default { ...@@ -282,8 +289,8 @@ export default {
btnClick(val) { btnClick(val) {
console.log('右侧按钮'); console.log('右侧按钮');
console.log(val); console.log(val);
if (val == 'add') this.addInformation(); if (val.val == 'add') this.addInformation();
if (val == 'download') this.downloadFormwork(); if (val.val == 'download') this.downloadFormwork();
}, },
init() { init() {
......
...@@ -9,15 +9,34 @@ ...@@ -9,15 +9,34 @@
<div class="module_container"> <div class="module_container">
<div class="card_container"> <div class="card_container">
<el-card class="box-card"> <el-card class="box-card">
<table-head :head_data="head_data" @search="searchEvent" @resetting="resetting" @btnClick="btnClick"></table-head> <table-head
:head_data="head_data"
@search="searchEvent"
@resetting="resetting"
@btnClick="btnClick"
></table-head>
<div class="table_container"> <div class="table_container">
<el-table v-loading="is_loading" :data="tableData" style="width: 100%;margin-bottom: 20px;" height="650"> <el-table
v-loading="is_loading"
:data="tableData"
style="width: 100%; margin-bottom: 20px"
height="650"
>
<el-table-column prop="id" label="编号" width="50"> <el-table-column prop="id" label="编号" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="examination_questions_title" label="考试标题"> <el-table-column
prop="examination_questions_title"
label="考试标题"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-document" style="color: #005FC2;" <el-button
@click="toDetail(scope.row)">{{ scope.row.examination_questions_title }}</el-button> size="mini"
type="text"
icon="el-icon-document"
style="color: #005fc2"
@click="toDetail(scope.row)"
>{{ scope.row.examination_questions_title }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="学员姓名"> <el-table-column prop="name" label="学员姓名">
...@@ -27,48 +46,81 @@ ...@@ -27,48 +46,81 @@
</el-table-column> </el-table-column>
<el-table-column prop="begin_answer_time" label="开始时间"> <el-table-column prop="begin_answer_time" label="开始时间">
</el-table-column> </el-table-column>
<el-table-column prop="answer_duration" label="答题时间" width="100"> <el-table-column
prop="answer_duration"
label="答题时间"
width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.answer_duration">{{ seconds_to_minutes(scope.row.answer_duration) }}</div> <div v-if="scope.row.answer_duration">
{{ seconds_to_minutes(scope.row.answer_duration) }}
</div>
<div v-else>暂无</div> <div v-else>暂无</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="score" label="得分"> <el-table-column prop="score" label="得分"> </el-table-column>
</el-table-column>
<el-table-column prop="created_at" label="创建时间"> <el-table-column prop="created_at" label="创建时间">
</el-table-column> </el-table-column>
<el-table-column prop="path" label="状态"> <el-table-column prop="path" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<el-tag v-if="scope.row.status == 1" type="success">预约完成</el-tag> <el-tag v-if="scope.row.status == 1" type="success"
<el-tag v-if="scope.row.status == 2" type="success" >预约完成</el-tag
style="background-color: #b4d7c6;border-color: #71b7a0;color: #038D6E;">考试完成</el-tag> >
<el-tag v-if="scope.row.status == 3" type="success">已发布</el-tag> <el-tag
v-if="scope.row.status == 2"
type="success"
style="
background-color: #b4d7c6;
border-color: #71b7a0;
color: #038d6e;
"
>考试完成</el-tag
>
<el-tag v-if="scope.row.status == 3" type="success"
>已发布</el-tag
>
<el-tag v-if="scope.row.status == 4" type="info">取消</el-tag> <el-tag v-if="scope.row.status == 4" type="info">取消</el-tag>
<el-tag v-if="scope.row.status == 6" type="danger">失效</el-tag> <el-tag v-if="scope.row.status == 6" type="danger"
>失效</el-tag
>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" style="color: #F56C6C;" @click="cancelReservation(scope.row)" <el-button
v-if="scope.row.status == 1">取消预约</el-button> size="mini"
type="text"
style="color: #f56c6c"
@click="cancelReservation(scope.row)"
v-if="scope.row.status == 1"
>取消预约</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div style="text-align: right;"> <div style="text-align: right">
<el-pagination @current-change="handleCurrentChange" :current-page.sync="request_params.page" <el-pagination
:page-size="request_params.limit" layout="total, prev, pager, next" :total="request_params.total"> @current-change="handleCurrentChange"
:current-page.sync="request_params.page"
:page-size="request_params.limit"
layout="total, prev, pager, next"
:total="request_params.total"
>
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
</div> </div>
<el-dialog title="提示" :visible.sync="is_dialogVisible" width="60%" :before-close="handleClose"> <el-dialog
<div> title="提示"
:visible.sync="is_dialogVisible"
</div> width="60%"
:before-close="handleClose"
>
<div></div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button> <el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="submitData">确 定</el-button> <el-button type="primary" @click="submitData">确 定</el-button>
...@@ -83,17 +135,17 @@ import { get_test_results_list, cancel_reservation } from '@/api/student'; ...@@ -83,17 +135,17 @@ import { get_test_results_list, cancel_reservation } from '@/api/student';
import { secondsToMinutes } from '@/utils/tool'; import { secondsToMinutes } from '@/utils/tool';
const standard_template = { const standard_template = {
id: null, id: null,
father_id: -1,//父级id father_id: -1, //父级id
is_show: false,//是否展示为菜单 is_show: false, //是否展示为菜单
name: null,//英文名称 name: null, //英文名称
name_zh: null,//中文名称 name_zh: null, //中文名称
path: null,//路由路径 path: null, //路由路径
sort: null,//排序 sort: null, //排序
status: 1,//状态 status: 1, //状态
type: 1,//类型:菜单/按钮 type: 1, //类型:菜单/按钮
view_path: null,//视图路径 view_path: null, //视图路径
icon: null,//图标 icon: null, //图标
} };
export default { export default {
data() { data() {
return { return {
...@@ -101,7 +153,7 @@ export default { ...@@ -101,7 +153,7 @@ export default {
//头部按钮 //头部按钮
head_data: { head_data: {
is_search_show: true, is_search_show: true,
search_placeholder: "学员姓名/手机号", search_placeholder: '学员姓名/手机号',
right_buttons: [ right_buttons: [
// { // {
// text: '新增', // text: '新增',
...@@ -129,12 +181,10 @@ export default { ...@@ -129,12 +181,10 @@ export default {
components: { TableHead }, components: { TableHead },
computed: { computed: {},
},
mounted() { mounted() {
this.init() this.init();
}, },
methods: { methods: {
...@@ -153,8 +203,7 @@ export default { ...@@ -153,8 +203,7 @@ export default {
btnClick(val) { btnClick(val) {
console.log('右侧按钮'); console.log('右侧按钮');
console.log(val); console.log(val);
if (val == 'add') this.addInformation(); if (val.val == 'add') this.addInformation();
}, },
init() { init() {
...@@ -166,20 +215,18 @@ export default { ...@@ -166,20 +215,18 @@ export default {
this.is_dialogVisible = false; this.is_dialogVisible = false;
}, },
//提交 //提交
submitData() { submitData() {},
},
//获取列表数据 //获取列表数据
getListData() { getListData() {
let params = this.$removeProperty(this.request_params); let params = this.$removeProperty(this.request_params);
this.is_loading = true; this.is_loading = true;
get_test_results_list(params).then(res => { get_test_results_list(params).then((res) => {
console.log('列表数据'); console.log('列表数据');
console.log(res); console.log(res);
this.tableData = res.data || []; this.tableData = res.data || [];
this.request_params.total = res.total; this.request_params.total = res.total;
this.is_loading = false; this.is_loading = false;
}) });
}, },
//分页 //分页
handleCurrentChange(val) { handleCurrentChange(val) {
...@@ -206,24 +253,25 @@ export default { ...@@ -206,24 +253,25 @@ export default {
this.$confirm('确认取消?', '提示', { this.$confirm('确认取消?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning',
}).then(() => { })
.then(() => {
let id = item.id; let id = item.id;
cancel_reservation(id).then(res => { cancel_reservation(id).then((res) => {
console.log('取消预约'); console.log('取消预约');
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
this.$message.success(res.message); this.$message.success(res.message);
this.getListData(); this.getListData();
} }
});
}) })
}).catch(() => { .catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消' message: '已取消',
}); });
}); });
}, },
//跳转详情 //跳转详情
toDetail(item) { toDetail(item) {
...@@ -232,9 +280,9 @@ export default { ...@@ -232,9 +280,9 @@ export default {
this.$router.push({ this.$router.push({
path: '/student/test_results_detail', path: '/student/test_results_detail',
query: { query: {
id: id id: id,
}, },
}) });
}, },
//秒转分 //秒转分
...@@ -242,11 +290,10 @@ export default { ...@@ -242,11 +290,10 @@ export default {
if (num) { if (num) {
return secondsToMinutes(num); return secondsToMinutes(num);
} else { } else {
return '暂无' return '暂无';
}
} }
}, },
} },
};
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
<script>
/**
* @Author: AnthonyD
* @Date: 2023-03-28 10:34:24
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-04-21 13:58:02
*/
</script>
<template> <template>
<div class="module_container"> <div class="module_container">
<div class="card_container"> <div class="card_container">
...@@ -164,7 +171,7 @@ export default { ...@@ -164,7 +171,7 @@ export default {
btnClick(val) { btnClick(val) {
console.log('右侧按钮'); console.log('右侧按钮');
console.log(val); console.log(val);
if (val == 'add') this.addTobaccoGrades(); if (val.val == 'add') this.addTobaccoGrades();
}, },
init() { init() {
......
...@@ -9,21 +9,33 @@ ...@@ -9,21 +9,33 @@
<div> <div>
<div class="card_container"> <div class="card_container">
<el-card class="box-card"> <el-card class="box-card">
<table-head :head_data="head_data" @search="searchEvent" @resetting="resetting" @btnClick="btnClick"></table-head> <table-head
:head_data="head_data"
@search="searchEvent"
@resetting="resetting"
@btnClick="btnClick"
></table-head>
<div class="table_container"> <div class="table_container">
<el-table v-loading="is_loading" :data="tableData" style="width: 100%;margin-bottom: 20px;" height="650" border <el-table
row-key="id" default-expand-all :tree-props="{ children: 'children', hasChildren: '' }"> v-loading="is_loading"
:data="tableData"
style="width: 100%; margin-bottom: 20px"
height="650"
border
row-key="id"
default-expand-all
:tree-props="{ children: 'children', hasChildren: '' }"
>
<el-table-column prop="department_name" label="部门名称"> <el-table-column prop="department_name" label="部门名称">
</el-table-column> </el-table-column>
<el-table-column prop="leader" label="部门领导"> <el-table-column prop="leader" label="部门领导"> </el-table-column>
</el-table-column> <el-table-column prop="phone" label="电话"> </el-table-column>
<el-table-column prop="phone" label="电话"> <el-table-column prop="email" label="邮箱"> </el-table-column>
</el-table-column>
<el-table-column prop="email" label="邮箱">
</el-table-column>
<el-table-column prop="status" label="状态" width="80"> <el-table-column prop="status" label="状态" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.status == 1" type="success">正常</el-tag> <el-tag v-if="scope.row.status == 1" type="success"
>正常</el-tag
>
<el-tag v-if="scope.row.status == 2" type="info">失效</el-tag> <el-tag v-if="scope.row.status == 2" type="info">失效</el-tag>
</template> </template>
</el-table-column> </el-table-column>
...@@ -31,10 +43,27 @@ ...@@ -31,10 +43,27 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" style="color: #000;" @click="addDepartment(scope.row)">新增</el-button> <el-button
<el-button size="mini" type="text" style="color: #000;" @click="editDepartment(scope.row)">编辑</el-button> size="mini"
<el-button size="mini" type="text" style="color: #F56C6C;" type="text"
@click="deleteDepartment(scope.row)">删除</el-button> style="color: #000"
@click="addDepartment(scope.row)"
>新增</el-button
>
<el-button
size="mini"
type="text"
style="color: #000"
@click="editDepartment(scope.row)"
>编辑</el-button
>
<el-button
size="mini"
type="text"
style="color: #f56c6c"
@click="deleteDepartment(scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -42,45 +71,72 @@ ...@@ -42,45 +71,72 @@
</el-card> </el-card>
</div> </div>
<el-dialog title="提示" :visible.sync="is_dialogVisible" width="60%" :before-close="handleClose"> <el-dialog
title="提示"
:visible.sync="is_dialogVisible"
width="60%"
:before-close="handleClose"
>
<div> <div>
<el-form label-width="150px"> <el-form label-width="150px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="上级部门"> <el-form-item label="上级部门">
<treeselect v-model="department_info.department_id" :options="tree_select_list" :normalizer="normalizer" <treeselect
:show-count="true" placeholder="选择上级菜单" /> v-model="department_info.department_id"
:options="tree_select_list"
:normalizer="normalizer"
:show-count="true"
placeholder="选择上级菜单"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="部门名称"> <el-form-item label="部门名称">
<el-input placeholder="请输入部门名称" v-model="department_info.department_name" /> <el-input
placeholder="请输入部门名称"
v-model="department_info.department_name"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="部门邮箱"> <el-form-item label="部门邮箱">
<el-input placeholder="请输入邮箱" v-model="department_info.email" /> <el-input
placeholder="请输入邮箱"
v-model="department_info.email"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系电话"> <el-form-item label="联系电话">
<el-input placeholder="请输入电话" v-model="department_info.phone" /> <el-input
placeholder="请输入电话"
v-model="department_info.phone"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="领导姓名"> <el-form-item label="领导姓名">
<el-input placeholder="请输入邮箱" v-model="department_info.leader" /> <el-input
placeholder="请输入邮箱"
v-model="department_info.leader"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="排序"> <el-form-item label="排序">
<el-input-number controls-position="right" :min="1" v-model="department_info.sort" style="width: 100%;" /> <el-input-number
controls-position="right"
:min="1"
v-model="department_info.sort"
style="width: 100%"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -93,7 +149,6 @@ ...@@ -93,7 +149,6 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button> <el-button @click="handleClose">取 消</el-button>
...@@ -105,10 +160,15 @@ ...@@ -105,10 +160,15 @@
<script> <script>
import TableHead from '@/components/TableHead/index'; import TableHead from '@/components/TableHead/index';
import { get_department_list, add_department, delete_department, edit_department } from '@/api/system'; import {
get_department_list,
add_department,
delete_department,
edit_department,
} from '@/api/system';
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from '@riophae/vue-treeselect';
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import '@riophae/vue-treeselect/dist/vue-treeselect.css';
const standard_template = { const standard_template = {
department_id: -1, department_id: -1,
department_name: null, department_name: null,
...@@ -117,7 +177,7 @@ const standard_template = { ...@@ -117,7 +177,7 @@ const standard_template = {
leader: null, leader: null,
sort: 0, sort: 0,
status: 1, status: 1,
} };
export default { export default {
data() { data() {
return { return {
...@@ -130,12 +190,12 @@ export default { ...@@ -130,12 +190,12 @@ export default {
text: '新增', text: '新增',
icon: 'el-icon-plus', icon: 'el-icon-plus',
event: 'add', event: 'add',
} },
], ],
}, },
//初始化请求参数 //初始化请求参数
request_params: { request_params: {
val: '',//搜索 val: '', //搜索
page: 1, page: 1,
limit: 10, limit: 10,
total: 1, total: 1,
...@@ -157,7 +217,7 @@ export default { ...@@ -157,7 +217,7 @@ export default {
computed: {}, computed: {},
mounted() { mounted() {
this.init() this.init();
}, },
methods: { methods: {
...@@ -176,7 +236,7 @@ export default { ...@@ -176,7 +236,7 @@ export default {
btnClick(val) { btnClick(val) {
console.log('右侧按钮'); console.log('右侧按钮');
console.log(val); console.log(val);
if (val == 'add') { if (val.val == 'add') {
this.addDepartment(null); this.addDepartment(null);
} }
}, },
...@@ -191,17 +251,20 @@ export default { ...@@ -191,17 +251,20 @@ export default {
//提交 //提交
submitData() { submitData() {
let data = { let data = {
department_id: this.department_info.department_id == -1 ? null : this.department_info.department_id, department_id:
this.department_info.department_id == -1
? null
: this.department_info.department_id,
department_name: this.department_info.department_name, department_name: this.department_info.department_name,
email: this.department_info.email, email: this.department_info.email,
phone: this.department_info.phone, phone: this.department_info.phone,
leader: this.department_info.leader, leader: this.department_info.leader,
sort: this.department_info.sort, sort: this.department_info.sort,
status: this.department_info.status, status: this.department_info.status,
} };
let params = this.$handleParams(data); let params = this.$handleParams(data);
if (this.is_updata_type == 'add') { if (this.is_updata_type == 'add') {
add_department(params).then(res => { add_department(params).then((res) => {
console.log('新增部门'); console.log('新增部门');
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
...@@ -209,17 +272,17 @@ export default { ...@@ -209,17 +272,17 @@ export default {
this.is_dialogVisible = false; this.is_dialogVisible = false;
this.init(); this.init();
} }
}) });
} else { } else {
let id = this.department_info.id; let id = this.department_info.id;
edit_department(id, params).then(res => { edit_department(id, params).then((res) => {
console.log('修改回调'); console.log('修改回调');
if (res.code == 200) { if (res.code == 200) {
this.$message.success(res.message); this.$message.success(res.message);
this.is_dialogVisible = false; this.is_dialogVisible = false;
this.init(); this.init();
} }
}) });
} }
}, },
...@@ -230,7 +293,7 @@ export default { ...@@ -230,7 +293,7 @@ export default {
console.log(params); console.log(params);
this.is_loading = true; this.is_loading = true;
this.tree_select_list = []; this.tree_select_list = [];
get_department_list(params).then(res => { get_department_list(params).then((res) => {
console.log('部门列表'); console.log('部门列表');
console.log(res); console.log(res);
this.tableData = res || []; this.tableData = res || [];
...@@ -238,15 +301,18 @@ export default { ...@@ -238,15 +301,18 @@ export default {
menu.children = res; menu.children = res;
this.tree_select_list.push(menu); this.tree_select_list.push(menu);
this.is_loading = false; this.is_loading = false;
}) });
}, },
/** 转换菜单数据结构 */ /** 转换菜单数据结构 */
normalizer(node) { normalizer(node) {
if (node.children && !node.children.length) delete node.children; if (node.children && !node.children.length) delete node.children;
return { id: node.id, label: node.department_name, children: node.children }; return {
id: node.id,
label: node.department_name,
children: node.children,
};
}, },
//新增 //新增
addDepartment(item) { addDepartment(item) {
this.is_updata_type = 'add'; this.is_updata_type = 'add';
...@@ -270,24 +336,24 @@ export default { ...@@ -270,24 +336,24 @@ export default {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning',
}).then(() => { })
delete_department(id).then(res => { .then(() => {
delete_department(id).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success(res.message); this.$message.success(res.message);
this.init(); this.init();
} }
});
}) })
}).catch(() => { .catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消删除' message: '已取消删除',
}); });
}); });
}
}, },
} },
};
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
...@@ -9,33 +9,63 @@ ...@@ -9,33 +9,63 @@
<div> <div>
<div class="card_container"> <div class="card_container">
<el-card class="box-card"> <el-card class="box-card">
<table-head :head_data="head_data" @search="searchEvent" @resetting="resetting" @btnClick="btnClick"></table-head> <table-head
:head_data="head_data"
@search="searchEvent"
@resetting="resetting"
@btnClick="btnClick"
></table-head>
<div class="table_container"> <div class="table_container">
<el-table v-loading="is_loading" :data="tableData" style="width: 100%;margin-bottom: 20px;" height="650"> <el-table
<el-table-column prop="id" label="角色ID"> v-loading="is_loading"
</el-table-column> :data="tableData"
<el-table-column prop="name" label="角色名称"> style="width: 100%; margin-bottom: 20px"
</el-table-column> height="650"
>
<el-table-column prop="id" label="角色ID"> </el-table-column>
<el-table-column prop="name" label="角色名称"> </el-table-column>
<el-table-column prop="created_at" label="创建时间"> <el-table-column prop="created_at" label="创建时间">
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" style="color: #000;" @click="editRoles(scope.row)">编辑</el-button> <el-button
<el-button size="mini" type="text" style="color: #F56C6C;" @click="deleteRoles(scope.row)">删除</el-button> size="mini"
type="text"
style="color: #000"
@click="editRoles(scope.row)"
>编辑</el-button
>
<el-button
size="mini"
type="text"
style="color: #f56c6c"
@click="deleteRoles(scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div style="text-align: right;"> <div style="text-align: right">
<el-pagination @current-change="handleCurrentChange" :current-page.sync="request_params.page" <el-pagination
:page-size="request_params.limit" layout="total, prev, pager, next" :total="request_params.total"> @current-change="handleCurrentChange"
:current-page.sync="request_params.page"
:page-size="request_params.limit"
layout="total, prev, pager, next"
:total="request_params.total"
>
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
</div> </div>
<el-dialog title="提示" :visible.sync="is_dialogVisible" width="600" :before-close="handleClose"> <el-dialog
<div style="overflow-y: auto;height: 600px;"> title="提示"
:visible.sync="is_dialogVisible"
width="600"
:before-close="handleClose"
>
<div style="overflow-y: auto; height: 600px">
<el-form label-width="100px"> <el-form label-width="100px">
<el-form-item label="角色ID" v-if="roles_info.id"> <el-form-item label="角色ID" v-if="roles_info.id">
<el-input v-model="roles_info.id" disabled></el-input> <el-input v-model="roles_info.id" disabled></el-input>
...@@ -46,16 +76,28 @@ ...@@ -46,16 +76,28 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="授权菜单"> <el-form-item label="授权菜单">
<el-tree ref="routeTree" :data="router_tree" show-checkbox node-key="id" <el-tree
:default-checked-keys="roles_info.permission" :props="defaultProps" ref="routeTree"
:key="new Date().getTime()"></el-tree> :data="router_tree"
show-checkbox
node-key="id"
:default-checked-keys="roles_info.permission"
:props="defaultProps"
:key="new Date().getTime()"
></el-tree>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="授权功能"> <el-form-item label="授权功能">
<el-tree ref="buttonTree" :data="button_tree" show-checkbox node-key="id" <el-tree
:default-checked-keys="roles_info.permissionButton" :props="defaultProps" ref="buttonTree"
:key="new Date().getTime()"></el-tree> :data="button_tree"
show-checkbox
node-key="id"
:default-checked-keys="roles_info.permissionButton"
:props="defaultProps"
:key="new Date().getTime()"
></el-tree>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -71,7 +113,13 @@ ...@@ -71,7 +113,13 @@
<script> <script>
import TableHead from '@/components/TableHead/index'; import TableHead from '@/components/TableHead/index';
import { get_permission_list, add_roles, delete_roles, edit_roles, get_permission_detail } from '@/api/role'; import {
get_permission_list,
add_roles,
delete_roles,
edit_roles,
get_permission_detail,
} from '@/api/role';
import { get_permission_btn_menu } from '@/api/system'; import { get_permission_btn_menu } from '@/api/system';
import { button_tree_add, route_tree_all } from '@/utils/route-handle'; import { button_tree_add, route_tree_all } from '@/utils/route-handle';
const standard_template = { const standard_template = {
...@@ -79,7 +127,7 @@ const standard_template = { ...@@ -79,7 +127,7 @@ const standard_template = {
name: '', name: '',
permission: [], permission: [],
permissionButton: [], permissionButton: [],
} };
export default { export default {
data() { data() {
return { return {
...@@ -92,12 +140,12 @@ export default { ...@@ -92,12 +140,12 @@ export default {
text: '新增', text: '新增',
icon: 'el-icon-user-solid', icon: 'el-icon-user-solid',
event: 'add', event: 'add',
} },
], ],
}, },
//初始化请求参数 //初始化请求参数
request_params: { request_params: {
val: '',//搜索 val: '', //搜索
page: 1, page: 1,
limit: 10, limit: 10,
total: 1, total: 1,
...@@ -115,8 +163,8 @@ export default { ...@@ -115,8 +163,8 @@ export default {
button_tree: [], button_tree: [],
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'name_zh' label: 'name_zh',
} },
}; };
}, },
...@@ -125,7 +173,7 @@ export default { ...@@ -125,7 +173,7 @@ export default {
computed: {}, computed: {},
mounted() { mounted() {
this.init() this.init();
}, },
methods: { methods: {
...@@ -144,7 +192,7 @@ export default { ...@@ -144,7 +192,7 @@ export default {
btnClick(val) { btnClick(val) {
console.log('右侧按钮'); console.log('右侧按钮');
console.log(val); console.log(val);
if (val == 'add') this.addRoles(); if (val.val == 'add') this.addRoles();
}, },
init() { init() {
this.getPermissionBtnMenu(); this.getPermissionBtnMenu();
...@@ -160,28 +208,36 @@ export default { ...@@ -160,28 +208,36 @@ export default {
console.log(this.roles_info); console.log(this.roles_info);
let router_key = this.$refs.routeTree.getCheckedNodes(false, true); let router_key = this.$refs.routeTree.getCheckedNodes(false, true);
let button_key = this.$refs.buttonTree.getCheckedNodes(false, true); let button_key = this.$refs.buttonTree.getCheckedNodes(false, true);
let route_ids = router_key.map(item => { return item.id }); let route_ids = router_key.map((item) => {
let button_ids = button_key.map(item => { return item.id }); return item.id;
});
let button_ids = button_key.map((item) => {
return item.id;
});
let data = this.$handleParams({ let data = this.$handleParams({
name: this.roles_info.name, name: this.roles_info.name,
permission: router_key.map(item => { return item.id }), permission: router_key.map((item) => {
permissionButton: button_key.map(item => { return item.id }) return item.id;
}) }),
permissionButton: button_key.map((item) => {
return item.id;
}),
});
console.log('要提交的数据'); console.log('要提交的数据');
console.log(data); console.log(data);
if (this.is_updata_type == 'add') { if (this.is_updata_type == 'add') {
add_roles(data).then(res => { add_roles(data).then((res) => {
console.log("新增角色回调"); console.log('新增角色回调');
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
this.$message.success(res.message); this.$message.success(res.message);
this.is_dialogVisible = false; this.is_dialogVisible = false;
this.getPermissionList(); this.getPermissionList();
} }
}) });
} else { } else {
let id = this.roles_info.id; let id = this.roles_info.id;
edit_roles(id, data).then(res => { edit_roles(id, data).then((res) => {
console.log('修改角色回调'); console.log('修改角色回调');
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
...@@ -189,9 +245,8 @@ export default { ...@@ -189,9 +245,8 @@ export default {
this.is_dialogVisible = false; this.is_dialogVisible = false;
this.getPermissionList(); this.getPermissionList();
} }
}) });
} }
}, },
//分页 //分页
handleCurrentChange(val) { handleCurrentChange(val) {
...@@ -200,7 +255,7 @@ export default { ...@@ -200,7 +255,7 @@ export default {
}, },
//获取 全部 按钮/路由分类数据 //获取 全部 按钮/路由分类数据
getPermissionBtnMenu() { getPermissionBtnMenu() {
get_permission_btn_menu().then(res => { get_permission_btn_menu().then((res) => {
console.log('获取全部路由按钮数据'); console.log('获取全部路由按钮数据');
console.log(res); console.log(res);
let permission = JSON.parse(JSON.stringify(res.permission)), let permission = JSON.parse(JSON.stringify(res.permission)),
...@@ -208,11 +263,10 @@ export default { ...@@ -208,11 +263,10 @@ export default {
this.router_tree = route_tree_all(permission); this.router_tree = route_tree_all(permission);
this.button_tree = button_tree_add(permissionButton, permission); this.button_tree = button_tree_add(permissionButton, permission);
console.log('结构数据@@@@@@@@@@@@@@@@@@@@@'); console.log('结构数据@@@@@@@@@@@@@@@@@@@@@');
console.log(this.router_tree); console.log(this.router_tree);
console.log(this.button_tree); console.log(this.button_tree);
}) });
}, },
//获取角色列表 //获取角色列表
...@@ -223,13 +277,13 @@ export default { ...@@ -223,13 +277,13 @@ export default {
limit: this.request_params.limit, limit: this.request_params.limit,
}); });
this.is_loading = true; this.is_loading = true;
get_permission_list(params).then(res => { get_permission_list(params).then((res) => {
console.log('角色列表'); console.log('角色列表');
console.log(res); console.log(res);
this.tableData = res.data || []; this.tableData = res.data || [];
this.request_params.total = res.total; this.request_params.total = res.total;
this.is_loading = false; this.is_loading = false;
}) });
}, },
//新增 //新增
addRoles() { addRoles() {
...@@ -241,9 +295,9 @@ export default { ...@@ -241,9 +295,9 @@ export default {
editRoles(item) { editRoles(item) {
this.is_updata_type = 'edit'; this.is_updata_type = 'edit';
//序号获取详情 //序号获取详情
get_permission_detail(item.id).then(res => { get_permission_detail(item.id).then((res) => {
this.roles_info = res; this.roles_info = res;
}) });
this.is_dialogVisible = true; this.is_dialogVisible = true;
}, },
//删除 //删除
...@@ -252,23 +306,24 @@ export default { ...@@ -252,23 +306,24 @@ export default {
this.$confirm('此操作将永久删除该角色, 是否继续?', '提示', { this.$confirm('此操作将永久删除该角色, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning',
}).then(() => { })
delete_roles(id).then(res => { .then(() => {
delete_roles(id).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success(res.message); this.$message.success(res.message);
this.getPermissionList(); this.getPermissionList();
} }
});
}) })
}).catch(() => { .catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消删除' message: '已取消删除',
}); });
}); });
}, },
}, },
} };
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论