相关方班级培训,新增班级名称修改功能
parent
b91d712a99
commit
66f708e4e6
|
@ -0,0 +1,170 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog :visible.sync="visible" :append-to-body="appendToBody" title="修改班级名称" width="700px" destroy-on-close >
|
||||
<el-form ref="form" :model="form" label-width="110px">
|
||||
<el-form-item label="班级名称" prop="CLASS_NAME">
|
||||
<el-input
|
||||
id="CLASS_NAME"
|
||||
ref="CLASS_NAME"
|
||||
v-model="form.CLASS_NAME"
|
||||
style="width: 400px;"
|
||||
maxlength="255"
|
||||
placeholder="这里输入班级名称..."
|
||||
title="班级名称"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="close">取 消</el-button>
|
||||
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vueQr from 'vue-qr'
|
||||
import { requestFN } from '@/utils/request'
|
||||
|
||||
export default {
|
||||
components: { vueQr },
|
||||
props: {
|
||||
appendToBody: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
qrCodeStr: '',
|
||||
form: {
|
||||
CLASS_NAME: '',
|
||||
CLASS_MESSAGE_ID: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(row) {
|
||||
this.visible = true
|
||||
this.form.CLASS_MESSAGE_ID = row.CLASS_MESSAGE_ID
|
||||
},
|
||||
close() {
|
||||
this.visible = false
|
||||
this.form = {
|
||||
CLASS_NAME: '',
|
||||
CLASS_MESSAGE_ID: ''
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
this.loading = true
|
||||
if (!this.form.CLASS_NAME || this.form.CLASS_NAME === '') {
|
||||
this.$message.error('请输入班级名称')
|
||||
return
|
||||
}
|
||||
requestFN('/classMessage/changeName', this.form).then((data) => {
|
||||
this.$message.success('保存成功')
|
||||
this.visible = false
|
||||
this.close()
|
||||
this.$emit('getResult')
|
||||
}).catch((e) => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.name{
|
||||
width: 120px;
|
||||
overflow: hidden;//溢出隐藏
|
||||
white-space: nowrap; // 强制一行显示
|
||||
text-overflow: ellipsis;// 显示。。。省略号
|
||||
}
|
||||
.red {
|
||||
width: 660px;
|
||||
color: #ff0000;
|
||||
margin-left: 34px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.bg_table {
|
||||
background: url("../../../../assets/tablebg.jpg") no-repeat bottom center;
|
||||
background-size: 100%;
|
||||
width: 660px;
|
||||
height: 430px;
|
||||
border: 4px solid #453d3a;
|
||||
transform: scale(0.5);
|
||||
transform-origin: top left;
|
||||
|
||||
.title {
|
||||
font-size: 28px;
|
||||
text-align: center;
|
||||
margin-top: 34px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.table {
|
||||
border-collapse: collapse;
|
||||
width: 590px;
|
||||
color: #453d3a;
|
||||
font-size: 20px;
|
||||
margin: 34px;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
|
||||
.tcenter {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.w60 {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.w74 {
|
||||
width: 148px
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 2px solid #453d3a;
|
||||
text-align: left;
|
||||
height: 40px;
|
||||
padding: 0 16px;
|
||||
|
||||
box-sizing: border-box;
|
||||
|
||||
.textone {
|
||||
width: 80px;
|
||||
text-align: justify;
|
||||
text-align-last: justify;
|
||||
text-justify: distribute-all-lines;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.text1 {
|
||||
width: 60px;
|
||||
text-align: justify;
|
||||
text-align-last: justify;
|
||||
text-justify: distribute-all-lines;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.text2 {
|
||||
width: 50px;
|
||||
text-align: justify;
|
||||
text-align-last: justify;
|
||||
text-justify: distribute-all-lines;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.text {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<el-dialog v-loading="loading" :visible.sync="visible" :title="title" :before-close="close" width="70%">
|
||||
<el-dialog v-loading="loading" :visible.sync="visible" :title="title" :before-close="close" width="70%" top="50px">
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="110px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">
|
||||
|
@ -81,6 +81,7 @@
|
|||
:data="peopleList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{'font-weight': 'bold','color': '#000'}"
|
||||
height="500px"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
|
|
|
@ -73,10 +73,17 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200">
|
||||
<template slot-scope="{row}">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.CLASS_MESSAGE_ID)">查看</el-button>
|
||||
<el-button v-show=" row.CLASS_STATUS === '0'" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.CLASS_MESSAGE_ID)">删除</el-button>
|
||||
<el-button v-show=" row.CLASS_STATUS === '1'" type="primary" size="mini" @click="uploadExcel(row)">信息反馈</el-button>
|
||||
<el-button v-if="false" v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.CLASS_MESSAGE_ID)">删除</el-button>
|
||||
</el-col>
|
||||
<el-col v-if="row.CLASS_STATUS === '0'" :span="24" style="margin-top: 10px">
|
||||
<el-button v-show=" row.CLASS_STATUS === '0'" type="primary" icon="el-icon-edit" size="mini" @click="changeName(row)">修改班级名称</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -90,6 +97,7 @@
|
|||
<edit ref="edit" :title="title" :is-show="isShow" @getResult = "getList"/>
|
||||
<init-class ref="initClass" :title="title" :is-show="isShow" @getResult = "getList"/>
|
||||
<upload-excel ref="uploadExcel" title="上传" append-to-body @getChoose="getFile"/>
|
||||
<change-name ref="changeName" @getResult = "getList"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -100,8 +108,9 @@ import edit from './edit.vue'
|
|||
import { upload } from '@/utils/upload'
|
||||
import uploadExcel from '../../../../components/uploadExcel/index.vue'
|
||||
import InitClass from './initClass.vue'
|
||||
import ChangeName from './changeName.vue'
|
||||
export default {
|
||||
components: { InitClass, uploadExcel, Pagination, edit },
|
||||
components: { ChangeName, InitClass, uploadExcel, Pagination, edit },
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
|
@ -201,7 +210,7 @@ export default {
|
|||
requestFN(
|
||||
'/classMessage/delete',
|
||||
{
|
||||
CLASSMESSAGE_ID: id
|
||||
CLASS_MESSAGE_ID: id
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
|
@ -336,6 +345,9 @@ export default {
|
|||
},
|
||||
uploadExcel(row) {
|
||||
this.$refs.uploadExcel.init(row)
|
||||
},
|
||||
changeName(row) {
|
||||
this.$refs.changeName.init(row)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -166,7 +166,7 @@ export default {
|
|||
downloadPdf(dom, '相关方安全告知培训合格证')
|
||||
},
|
||||
getShowPicture(row) {
|
||||
if (row.PHOTO && row.PHOTO !== '' && (row.PHOTO.indexOf('.jpg') >= 0 || row.PHOTO.indexOf('.png') >= 0 || row.PHOTO.indexOf('.jpeg') >= 0)) {
|
||||
if (row.PHOTO) {
|
||||
return true
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue