| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | @click="openDialog('add',{})" |
| | | >新增</el-button> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | <el-form :inline="true" style="display: flex;align-items: center;flex-wrap: wrap;" > |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | @click="openDialog('add',{})" |
| | | >新增</el-button> |
| | | </el-form-item> |
| | | <el-form-item label="企业名称:" > |
| | | <el-input v-model="data.queryParams.name" placeholder="请输入企业名称"></el-input> |
| | | </el-form-item> |
| | | <el-form-item > |
| | | <el-button |
| | | type="primary" |
| | | @click="getList" |
| | | >查询</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | @click="reset" |
| | | >重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | |
| | | <el-table-column label="企业名称" prop="name" align="center" /> |
| | | <el-table-column label="负责人" prop="major" align="center" /> |
| | | <el-table-column label="联系电话" prop="phone" align="center"/> |
| | | <el-table-column label="当前剩余课时(分)" prop="remainPeriodMin" align="center" width="150"/> |
| | | <el-table-column label="累计已用课时(分)" prop="spendPeriodMin" align="center" width="150"/> |
| | | <el-table-column label="当前剩余课时(分)" prop="remainPeriodMin" align="center" width="150" /> |
| | | <el-table-column label="累计已用课时(分)" prop="spendPeriodMin" align="center" width="150"> |
| | | <template #default="scope"> |
| | | <span>{{((scope.row.totalPeriod -scope.row.remainPeriod)/60).toFixed(2).replace(/\.00$/, '') + '分钟' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="总课时(分)" prop="totalPeriodMin" align="center"/> |
| | | <el-table-column label="课时变动详情" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | name: '' |
| | | }, |
| | | total: 0, |
| | | dataList: [] |
| | |
| | | return{ |
| | | ...item, |
| | | remainPeriodMin: item.remainPeriod ?(item.remainPeriod /60).toFixed(2).replace(/\.00$/, '') + '分钟':'', |
| | | spendPeriodMin:item.spendPeriod ?(item.spendPeriod /60).toFixed(2).replace(/\.00$/, '') + '分钟':'', |
| | | totalPeriodMin:item.totalPeriod ?(item.totalPeriod /60).toFixed(2).replace(/\.00$/, '') + '分钟':'', |
| | | } |
| | | }) |
| | |
| | | |
| | | /** 重置新增的表单以及其他数据 */ |
| | | function reset() { |
| | | proxy.resetForm("roleRef"); |
| | | data.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | name: '' |
| | | } |
| | | getList() |
| | | } |
| | | const handleDelete = (val) => { |
| | | ElMessageBox.confirm( |