|
@@ -0,0 +1,86 @@
|
|
|
+<template>
|
|
|
+ <div id="headNameList">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="info">
|
|
|
+ <el-col :span="6" class="list" v-for="(item, index) in headNameList" :key="index" @click.native="clickAssign()">
|
|
|
+ <p class="name">{{ item.name }}</p>
|
|
|
+ <p class="job" v-if="item.job">{{ item.job }}<i class="el-icon-circle-check"></i></p>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-dialog title="指派职务" width="90%" :visible.sync="assignShow">
|
|
|
+ <el-form :model="assignForm">
|
|
|
+ <el-form-item label="学生姓名">
|
|
|
+ <el-input v-model="assignForm.name" :disabled="true"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="学生职务">
|
|
|
+ <!-- <el-input v-model="assignForm.job" placeholder="请输入学生职务"></el-input> -->
|
|
|
+ <el-select v-model="assignForm.job" placeholder="请选择学生职务">
|
|
|
+ <el-option v-for="(item, index) in job_list" :key="index" :label="item.name" :value="item.name"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="outAssignShow">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="onAssignShow">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: 'headNameList',
|
|
|
+ props: {
|
|
|
+ headNameList: null,
|
|
|
+ assignForm: null,
|
|
|
+ assignShow: null,
|
|
|
+ },
|
|
|
+ components: {},
|
|
|
+ data: () => ({
|
|
|
+ job_list: [
|
|
|
+ {
|
|
|
+ name: '班长',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '学委',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ }),
|
|
|
+ created() {},
|
|
|
+ computed: {},
|
|
|
+ methods: {
|
|
|
+ clickAssign() {
|
|
|
+ this.$emit('assign');
|
|
|
+ },
|
|
|
+ outAssignShow() {
|
|
|
+ this.$emit('outForm');
|
|
|
+ },
|
|
|
+ onAssignShow() {
|
|
|
+ this.$emit('onForm', { data: this.assignForm });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+p {
|
|
|
+ padding: 0;
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+.list {
|
|
|
+ text-align: center;
|
|
|
+ padding: 15px 0 0 0;
|
|
|
+}
|
|
|
+.list .name {
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+.list .job {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #405ffe;
|
|
|
+ padding: 5px 0 0 0;
|
|
|
+}
|
|
|
+/deep/.el-dialog__headerbtn {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+</style>
|