<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" v-show="showSearch" inline>
      <el-form-item label="年级" prop="gradeValue">
        <el-select v-model="queryParams.gradeValue" placeholder="请选择年级" clearable>
          <el-option v-for="dict in dict.type.Grade" :key="dict.value" :label="dict.label" :value="dict.value">
            {{ dict.label }}
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="班级" prop="classValue">
        <el-select v-model="queryParams.classValue" placeholder="请选择班级" clearable>
          <el-option v-for="dict in dict.type.Class" :key="dict.value" :label="dict.label" :value="dict.value">
            {{ dict.label }}
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="班主任姓名" prop="teacherName">
        <el-input v-model="queryParams.teacherName" clearable placeholder="请输入班主任姓名"></el-input>
      </el-form-item>
      <el-form-item label="班主任手机号" prop="teacherTel">
        <el-input v-model="queryParams.teacherTel" clearable placeholder="请输入班主任手机号"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索
        </el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>

    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="info" plain icon="el-icon-search" size="mini" :disabled="single" @click="handleDetail"
                   v-hasPermi="['system:grade:edit']">详情
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
                   v-hasPermi="['system:grade:edit']">修改
        </el-button>
      </el-col>

      <el-col :span="1.5" style="position: absolute; float: right; right: 114px;">
        <el-select
          style="width: 100px;"
          size="mini"
          v-model="queryParams.schoolYear"
          @change="handleQuery">
          <el-option
            v-for="item in yearList"
            :key="item.value"
            :value="item.value"
            :label="item.label"
          ></el-option>
        </el-select>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
    </el-row>
    <el-table
      v-loading="loading"
      stripe
      :data="ClassList"
      :cell-style="{padding: '5px'}"
      @selection-change="handleSelectionChange"
      width="100%">
      <el-table-column type="selection" width="55px" align="center"/>
      <el-table-column header-align="center" align="center" prop="picUrl" label="班徽" min-width="100"
                       v-if="columns[0].visible">
        <template slot-scope="scope">
          <el-image
            style="width: 36px; height: 36px"
            :src="baseUrl+scope.row.picUrl"
            :preview-src-list="[baseUrl+scope.row.picUrl]"
            fit="fill">
            <div slot="error" class="image-slot">
              <!--<i class="el-icon-picture-outline" style="font-size: 30px;line-height: 30px"></i>-->
            </div>
          </el-image>
        </template>
      </el-table-column>

      <el-table-column header-align="center" align="center" prop="schoolYear" label="开始学年" min-width="80"/>
      <el-table-column header-align="center" align="center" prop="gradeValue" label="年级" min-width="80">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.Grade" :value="scope.row.gradeValue"></dict-tag>
        </template>
      </el-table-column>
      <el-table-column header-align="center" align="center" prop="classValue" label="班级" min-width="80">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.Class" :value="scope.row.classValue"></dict-tag>
        </template>
      </el-table-column>
      <el-table-column header-align="center" align="center" prop="className" label="班级名称" min-width="120"
                       show-overflow-tooltip/>
      <el-table-column header-align="center" align="center" prop="classAlias" label="班级别名" min-width="120"
                       show-overflow-tooltip/>
      <el-table-column header-align="center" align="center" prop="teacherName" min-width="100" label="班主任姓名"
                       show-overflow-tooltip/>
      <el-table-column header-align="center" align="center" prop="teacherTel" min-width="150" label="班主任手机号"/>
      <el-table-column header-align="center" align="center" prop="houseName" min-width="150" label="所在教学楼"
                       show-overflow-tooltip/>
      <el-table-column label="操作" align="center" min-width="180" fixed="right">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['system:grade:edit']">编辑
          </el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-search"
            @click="teachersListEdit(scope.row)"
            v-hasPermi="['system:grade:edit']">任课教师列表
          </el-button>
          <!--          <el-button-->
          <!--            size="mini"-->
          <!--            type="text"-->
          <!--            icon="el-icon-delete"-->
          <!--            @click="handleDelete(scope.row)"-->
          <!--            v-hasPermi="['system:grade:remove']">删除-->
          <!--          </el-button>-->
        </template>
      </el-table-column>
    </el-table>

    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
                @pagination="getList"/>

    <!-- 添加或修改学校班级对话框 -->
    <el-dialog :title="title" :visible.sync="dialogVisibleforClass" width="800px" append-to-body>
      <el-form
        ref="form"
        :model="form"
        :rules="rules"
        :disabled="!isEdit"
        label-width="140px">
        <el-form-item
          prop="picUrl"
          label-width="0"
          style="display: flex;text-align: center;justify-content: center;">
          <el-upload
            v-loading="uploadLoading"
            class="avatar-uploader"
            action="#"
            accept="image/*"
            :show-file-list="false"
            :on-success="handleAvatarSuccess"
            :before-upload="beforeAvatarUpload"
            :http-request="uploadImage"
          >
            <img v-if="form.picUrl" :src="this.baseUrl + form.picUrl" class="avatar">
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
          <div>班徽</div>
        </el-form-item>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="开始学年：" prop="schoolYear">
              <el-date-picker
                disabled
                v-model="form.schoolYear"
                type="year"
                value-format="yyyy"
                placeholder="选择学年"
                style="width: 100%;"

              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="年级：" prop="gradeValue">
              <el-select
                disabled
                v-model="form.gradeValue"
                clearable
                style="width: 100%;"
              >
                <el-option
                  v-for="dict in dict.type.Grade"
                  :key="dict.value"
                  :label="dict.label"
                  :value="Number(dict.value)">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="班级：" prop="classValue">
              <el-select disabled v-model="form.classValue" clearable style="width: 100%;">
                <el-option v-for="dict in dict.type.Class" :key="dict.value" :label="dict.label"
                           :value="Number(dict.value)">{{ dict.label }}
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <!--<el-col :span="12">-->
          <!--  <el-form-item>-->
          <!--  <span slot="label">-->
          <!--      <el-tooltip effect="dark" content="格式：年份-年级-班级" placement="left">-->
          <!--        <i class="el-icon-question"/>-->
          <!--      </el-tooltip>-->
          <!--      班级别名：-->
          <!--  </span>-->
          <!--    <el-input :value="resolveClassName(form)" readonly clearable></el-input>-->
          <!--  </el-form-item>-->
          <!--</el-col>-->
          <el-col :span="12">
            <el-form-item label="班级别名：">
              <el-input disabled :value="resolveClassName(form)"></el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="班主任：" prop="teacherName">
              <el-input disabled v-model="form.teacherName" placeholder="" clearable @click.native="selectTeacher"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="班主任手机号：">
              <el-input disabled v-model.number="form.teacherTel" :maxlength="TEXT_SIZE_TEL" clearable></el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="所在教学楼：">
              <el-input disabled v-model="form.houseName" clearable></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="班级口号：">
              <el-input
                v-model="form.classSlogan"
                type="textarea"
                resize="none"
                :autosize="true"
                :maxlength="TEXT_SIZE_ONE_HU"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="班主任寄语：" prop="teacherWord">
              <el-input
                type="textarea"
                :maxlength="TEXT_SIZE_ONE_TH"
                :show-word-limit="true"
                :autosize="{minRows:2}"
                v-model="form.teacherWord"
              ></el-input>
            </el-form-item>
          </el-col>
          <!--<el-col :span="12">-->
          <!--  <el-form-item label="备注：">-->
          <!--    <el-input v-model="form.remark" clearable></el-input>-->
          <!--  </el-form-item>-->
          <!--</el-col>-->
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 学员导入对话框-->
    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
      <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
                 :action="upload.url" :disabled="upload.isUploading"
                 :on-progress="handleFileUploadProgress"
                 :on-success="handleFileSuccess"
                 :auto-upload="false"
                 drag>
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
        <div class="el-upload__tip text-center" slot="tip">
          <span>仅允许导入xls、xlsx格式文件。</span>
          <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
                   @click="importTemplate">下载模板
          </el-link>
        </div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFileForm">确 定</el-button>
        <el-button @click="upload.open = false">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 老师信息选择对话框框 -->
    <TeacherSelect v-if="teacherOptions.open" :openSelect.sync="teacherOptions.open" :title="teacherOptions.title"
                   @getTeacherList="getTeacherList" @setTeacherInfo="setTeacherInfo"></TeacherSelect>
  </div>
</template>

<script>
import {
  getClassList,
  getDetailInfo,
  addClass,
  editClass,
  deleteClass,
  allBY,
} from "@/api/smartSchool/classAdviser/classView";
import TeacherSelect from '@/views/components/moduleComponets/TeacherSelect/index.vue'
import {listInform} from "@/api/smartSchool/teacherManage/teacherInformation";
import PicAvatar from "@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar";
import {commonUpload} from "@/api/common";
import {getYearList} from "@/utils/utilLibrary/getYearList";
import {getToken} from "@/utils/auth.js";
import {TempGrades, TEXT_SIZE_ONE_HU, TEXT_SIZE_ONE_TH, TEXT_SIZE_TEL} from "@/enums/common";
import {getNewYear} from "@/api/smartSchool/gradeWork/classView";

export default {
  name: "HandleClass",
  dicts: ["Class", "Grade", "grade_type"],
  components: {TeacherSelect, PicAvatar},
  data() {
    return {
      baseUrl: process.env.VUE_APP_BASE_API,
      // 文本域
      TEXT_SIZE_ONE_HU,
      TEXT_SIZE_ONE_TH,
      TEXT_SIZE_TEL,
      //获取子组件传来的信息
      pic: [],
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 学校班级表格数据
      ClassList: [],
      // 弹出层标题
      title: "",
      // 添加或修改学校班级对话框
      dialogVisibleforClass: false,
      // 任课教师列表对话框
      dialogVisibleForTeachers: false,
      // 教师对话框标题
      titleInform: '',
      // 老师信息选择对话框
      openTeacherInform: false,
      // 班级导入参数
      upload: {
        // 是否显示弹出层（班级导入）
        open: false,
        // 弹出层标题（班级导入）
        title: "",
        // 是否禁用上传
        isUploading: false,
        // 设置上传的请求头部
        headers: {Authorization: "Bearer " + getToken()},
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/schoolGrade/importData"
      },
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        classValue: undefined,
        gradeAlias: undefined,
        houseName: undefined,
        teacherName: undefined,
        teacherTel: undefined,
        isUsed: undefined,
        schoolYear: this.newYear()
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        classValue: [{required: true, message: '班级不能为空', trigger: 'change'}],
        schoolYear: [{required: true, message: '学年不能为空', trigger: 'change'}],
        gradeValue: [{required: true, message: '年级不能为空', trigger: 'change'}],
        teacherTel: [{pattern: /^(13|14|15|17|18)\d{9}$/, message: '请输入正确格式的电话号码', trigger: 'blur'}],
        teacherName: [{required: true, message: '班主任不能为空', trigger: 'change'}],
        teacherWord: [{required: true, message: '寄语不能为空', trigger: 'blur'}],
      },
      // 任课教师列表表单
      teachersListForm: {},
      // 教师列表
      teachersList: [],
      // 新增或修改老师对话框
      teacherPerForm: {},
      // 控制表格属性的显示与隐藏
      columns: [
        {key: 0, label: `班徽`, visible: true},
        {key: 1, label: `开始学年`, visible: true},
        {key: 2, label: `类型`, visible: false},
        {key: 3, label: `年级`, visible: true},
        {key: 4, label: `班级`, visible: true},
        {key: 5, label: `班级别名`, visible: true},
        {key: 6, label: `所在教学楼`, visible: true},
        {key: 7, label: `班主任姓名`, visible: true},
        {key: 8, label: `班主任手机号`, visible: true},
        {key: 9, label: `班级口号`, visible: true},
        {key: 10, label: `班主任寄语`, visible: false},
        {key: 11, label: `是否毕业`, visible: true},
        {key: 12, label: `备注`, visible: false},
      ],
      // 选择老师对话框
      teacherOptions: {
        open: false,
        title: '选择老师'
      },

      // 上传图片的加载效果
      uploadLoading: false,
      // imageUrl: '',
      // 年份列表数据
      yearList: [],
      // 表单是否可以修改、
      isEdit: true,
    };
  },
  created() {
    this.newYear().then(() => {
      this.getList()
    });
    this.yearList = getYearList();
  },
  computed: {
    resolveClassName() {
      return form => {
        // const result = ['*', '*', '*'];
        const result = [];
        const {classValue, gradeValue, schoolYear} = form;
        classValue && (result[1] = this.dict.type.Class.find(item => item.value == classValue).label);
        gradeValue && (result[0] = TempGrades.find(item => item.value == gradeValue).label);
        // schoolYear && (result[0] = schoolYear);
        form.gradeName = result[0];
        form.className = result[1];
        form.classAlias = result.join('');
        return form.classAlias;
      }
    }
  },
  watch: {
    'form.schoolYear'(val) {
      this.form.schoolYear = '' + val;
    },
    pic: {
      handler(newValue, oldValue) {
        this.isUploadPic = newValue[3]
      }
    }
  },
  methods: {
    async newYear() {
      let res = await getNewYear()
      this.queryParams.schoolYear = res.schoolYear
    },
    /** 查询学校班级列表 */
    getList() {
      this.loading = true;
      getClassList(this.queryParams).then((response) => {
        this.ClassList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.dialogVisibleforClass = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        picUrl: '',
        schoolYear: '',
        gradeValue: '',
        classValue: '',
        classAlias: '',
        teacherName: '',
        houseName: '',
        remark: '',
        teacherTel: '',
        classSlogan: '',
        teacherWord: ''
      };
      this.imageUrl = '';
      //表单可编辑
      this.isEdit = true;
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      // this.queryParams.schoolYear = this.newYear()
      this.newYear().then(() => {
        this.handleQuery();
      })
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    //获取图片信息
    getClassInfoPic(val) {
      this.pic = val
    },
    /** 新增班级按钮操作 */
    handleAdd() {
      this.reset();
      this.dialogVisibleforClass = true;
      this.title = "添加班级信息";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids;
      this.$modal.loading('正在加载数据，请稍等...');
      getDetailInfo(id).then((response) => {
        this.$modal.closeLoading();
        this.form = response.data;
        this.isEdit = true;
        this.dialogVisibleforClass = true;
        this.title = "修改班级信息";
      }).catch(error => {
        this.$modal.closeLoading();
      })
    },

    /** 查看详情 */
    handleDetail(row) {
      this.reset();
      const id = row.id || this.ids;
      this.$modal.loading('正在加载数据，请稍等...');
      getDetailInfo(id).then(response => {
        this.$modal.closeLoading();
        this.form = response.data;
        this.dialogVisibleforClass = true;
        this.title = "班级详情";
        this.isEdit = false;
      }).catch(error => {
        this.$modal.closeLoading();
      })
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          // 将年级和班级信息赋值
          this.handleBaseInfo();
          this.$modal.loading('正在上传数据，请稍等...');
          if (this.form.id != null) {
            editClass(this.form).then((response) => {
              this.$modal.closeLoading();
              this.$modal.msgSuccess("修改班级成功");
              this.dialogVisibleforClass = false;
              this.getList();
            }).catch(error => {
              this.$modal.closeLoading();
            })
          } else {
            addClass({
              ...this.form,
              gradeType: 4
            }).then((response) => {
              this.$modal.closeLoading();
              this.$modal.msgSuccess("新增班级成功");
              this.dialogVisibleforClass = false;
              this.getList();
            }).catch(error => {
              this.$modal.closeLoading();
            })
          }
        }
      });
    },
    handleBaseInfo() {
      this.form.gradeName = this.dict.type.Grade.find(item => item.value == this.form.gradeValue).label;
      this.form.className = this.dict.type.Class.find(item => item.value == this.form.classValue).label;
    },


    /** 删除按钮操作 */
    // handleDelete(row) {
    //   const ids = row.id || this.ids;
    //   this.$modal.confirm('是否确认删除选中数据？').then(() => {
    //     this.$modal.loading('正在处理数据，请稍等...');
    //     return deleteClass(ids);
    //   }).then(response => {
    //     this.$modal.closeLoading();
    //     this.$modal.msgSuccess("删除班级成功");
    //     this.getList();
    //   }).catch(error => {
    //     this.$modal.closeLoading();
    //   })
    // },
    // // 批量毕业
    // handleGraduation() {
    //   allBY(this.ids).then((reponse) => {
    //     this.$modal.msgSuccess("操作成功");
    //     this.getList();
    //   });
    // },

    // 下载班级模板
    importTemplate() {
      this.download(
        "/schoolGrade/importTemplate",
        {},
        `class_${Date.now()}.xlsx`
      );
    },

    /** 导入按钮操作 */
    handleImport() {
      this.upload.title = "班级导入";
      this.upload.open = true;
    },

    /** 导出班级按钮操作 */
    handleExportClass() {
      const length = this.ids.length;
      const ids = this.ids;
      if (!length) {
        this.download(
          "/schoolGrade/export",
          {
            ...this.queryParams,
          },
          `class_${Date.now()}.xlsx`
        );
      } else {
        this.download(
          "/schoolGrade/export/" + ids,
          {
            ...this.queryParams,
          },
          `class_${Date.now()}.xlsx`
        );
      }
    },
    // 获取教师信息
    teacherInfoList() {
      this.teacherOptions.open = true;
    },
    /** 选择老师(打开对话框) */
    selectTeacher() {
      this.teacherOptions.open = true;
    },

    /** 获取老师信息列表 */
    getTeacherList(queryForm, callback) {
      listInform(queryForm).then(response => {
        callback(response.rows, response.total);
      }).catch(error => {
        callback([], 0);
      })
    },
    /** 设置老师信息 */
    setTeacherInfo(item) {
      // this.form.teacherName = item.teacherName;
      this.$set(this.form, 'teacherName', item.teacherName);
      this.$set(this.form, 'teacherTel', item.teacherTel);
      this.$set(this.form, 'teacherId', item.id);

    },
    // 任课教师列表
    teachersListEdit(row) {
      this.$router.push({
        path: "/classAdviser/classManage/teacherList",
        query: {
          gradeId: row.id,
          routeBack: 1
        },
      });
    },
    // 是否毕业按钮切换
    changeSwitch(row) {
      // const ids=this.ids||row.id
      let text = row.isGraduated === "1" ? "毕业" : "取消毕业";
      this.$modal.confirm('确认要' + text + '"' + row.classAlias + '"班级吗？').then(function () {
        return allBY(row.id, row.isGraduated);
      }).then(() => {
        this.$modal.msgSuccess(text + "成功");
      }).catch(function () {
        row.isGraduated = row.isGraduated === "0" ? "1" : "0";
      });
    },


    // 图片上传功能
    uploadImage(file) {
      const fileData = file.file;
      const formData = new FormData();
      formData.append('file', fileData);
      this.uploadLoading = true;
      commonUpload(formData).then(response => {
        this.uploadLoading = false;
        this.$modal.msgSuccess('上传成功');
        // this.imageUrl = this.baseUrl + response.fileName;
        this.form.picUrl = response.fileName;
      }).catch(error => {
        this.uploadLoading = false;
      })
    },
    // 上传图片之前的钩子函数
    beforeAvatarUpload() {
    },
    // 上传成功
    handleAvatarSuccess() {

    },
    /** 上传过程 */
    handleFileUploadProgress() {
      this.upload.isUploading = true;
    },
    /** 上传成功 */
    handleFileSuccess(response) {
      this.upload.open = false;
      this.upload.isUploading = false;
      this.$refs.upload.clearFiles();
      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", {dangerouslyUseHTMLString: true});
      this.getList();
    },
    /** 提交 */
    submitFileForm() {
      this.$refs.upload.submit();
    }

  },
};
</script>

<style>
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}

.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}

.avatar {
  width: 178px;
  height: 178px;
  display: block;

}
</style>

