| | |
| | | plain |
| | | icon="Plus" |
| | | @click="openDialog('add',{})" |
| | | v-hasPermi="['courseManage:list:add']" |
| | | >新增</el-button> |
| | | </el-form-item> |
| | | <el-form-item label="课程名称:" > |
| | |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column label="序号" type="index" align="center" width="80" /> |
| | | <el-table-column label="封面" prop="logo" align="center" width="130"> |
| | | <template #default="scope"> |
| | | <div class="demo-image__preview" v-if="scope.row.logo && scope.row.logo.length>0"> |
| | | <el-image |
| | | style="width: 100px; height: 100px" |
| | | :src= "scope.row.logo[0]" |
| | | :zoom-rate="1.2" |
| | | :max-scale="7" |
| | | :min-scale="0.2" |
| | | :preview-src-list="scope.row.logo" |
| | | :initial-index="0" |
| | | fit="cover" |
| | | :preview-teleported=true |
| | | /> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="封面" prop="logo" align="center" width="130">--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <div class="demo-image__preview" v-if="scope.row.logo && scope.row.logo.length>0">--> |
| | | <!-- <el-image--> |
| | | <!-- style="width: 100px; height: 100px"--> |
| | | <!-- :src= "scope.row.logo[0]"--> |
| | | <!-- :zoom-rate="1.2"--> |
| | | <!-- :max-scale="7"--> |
| | | <!-- :min-scale="0.2"--> |
| | | <!-- :preview-src-list="scope.row.logo"--> |
| | | <!-- :initial-index="0"--> |
| | | <!-- fit="cover"--> |
| | | <!-- :preview-teleported=true--> |
| | | <!-- />--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="课程名称" prop="name" align="center" /> |
| | | <el-table-column label="课程分类" prop="categoryName" align="center" /> |
| | | <el-table-column label="要求课时" prop="period" align="center" > |
| | | <template #default="scope"> |
| | | <span>{{ scope.row.period?(scope.row.period/60).toFixed(2).replace(/\.00$/, '') + '分钟':'' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="提交单位" prop="companyName" align="center" /> |
| | | <el-table-column label="审核状态" prop="state" align="center" > |
| | | <template #default="scope"> |
| | | <el-tooltip |
| | | v-if="scope.row.state == 3 && scope.row.message !=''" |
| | | class="box-item" |
| | | effect="dark" |
| | | :content="scope.row.message" |
| | | placement="top" |
| | | > |
| | | <span>审批不通过</span> |
| | | </el-tooltip> |
| | | <span v-else>{{scope.row.state == 0?'待提交':scope.row.state == 1?'待审核':scope.row.state == 2?'审批通过':'审批不通过'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="要求课时" prop="period" align="center" >--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <span>{{ scope.row.period?(scope.row.period/60).toFixed(2).replace(/\.00$/, '') + '分钟':'' }}</span>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column label="提交单位" prop="companyName" align="center" />--> |
| | | <!-- <el-table-column label="审核状态" prop="state" align="center" >--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-tooltip--> |
| | | <!-- v-if="scope.row.state == 3 && scope.row.message !=''"--> |
| | | <!-- class="box-item"--> |
| | | <!-- effect="dark"--> |
| | | <!-- :content="scope.row.message"--> |
| | | <!-- placement="top"--> |
| | | <!-- >--> |
| | | <!-- <span>审批不通过</span>--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- <span v-else>{{scope.row.state == 0?'待提交':scope.row.state == 1?'待审核':scope.row.state == 2?'审批通过':'审批不通过'}}</span>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="创建时间" prop="createTime" align="center" width="180" /> |
| | | <el-table-column label="状态" prop="status" align="center" > |
| | | <!-- <el-table-column label="状态" prop="status" align="center" >--> |
| | | |
| | | <template #default="scope" v-if="data.isAdmin"> |
| | | <el-switch |
| | | v-if="scope.row.state == 2" |
| | | v-model="scope.row.status" |
| | | :active-value="0" |
| | | :inactive-value="1" |
| | | inline-prompt |
| | | active-text="正常" |
| | | inactive-text="停用" |
| | | @change="switchStatus($event,scope.row)" |
| | | /> |
| | | <span v-else>--</span> |
| | | </template> |
| | | <template #default="scope" v-else> |
| | | <span v-if="scope.row.state == 2">{{scope.row.status == 1? '停用' : '正常'}}</span> |
| | | <span v-else>--</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <template #default="scope" v-if="data.isAdmin">--> |
| | | <!-- <el-switch--> |
| | | <!-- v-if="scope.row.state == 2"--> |
| | | <!-- v-model="scope.row.status"--> |
| | | <!-- :active-value="0"--> |
| | | <!-- :inactive-value="1"--> |
| | | <!-- inline-prompt--> |
| | | <!-- active-text="正常"--> |
| | | <!-- inactive-text="停用"--> |
| | | <!-- @change="switchStatus($event,scope.row)"--> |
| | | <!-- />--> |
| | | <!-- <span v-else>--</span>--> |
| | | <!-- </template>--> |
| | | <!-- <template #default="scope" v-else>--> |
| | | <!-- <span v-if="scope.row.state == 2">{{scope.row.status == 1? '停用' : '正常'}}</span>--> |
| | | <!-- <span v-else>--</span>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="240"> |
| | | <template #default="scope"> |
| | | <div v-if="data.isAdmin || data.userType == 6"> |
| | | <div v-if="scope.row.state !== 3"> |
| | | <el-button link type="primary" v-if="scope.row.state == 1" @click="openApprove(scope.row)">审核</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="primary" @click="toChapters(scope.row)">章节</el-button> |
| | | <el-button link type="primary" @click="toChapters(scope.row)">添加课程资源</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </div> |
| | | <div v-else><el-button link type="primary" @click="toChapters(scope.row)">章节</el-button></div> |
| | |
| | | <div v-if="scope.row.state !== 2"> |
| | | <el-button link type="primary" v-if="scope.row.state == 0 || scope.row.state == 3" @click="submitApprove(scope.row)">提交审核</el-button> |
| | | <el-button link type="primary" v-if="scope.row.state == 1" @click="submitApprove(scope.row)">取消审核</el-button> |
| | | <el-button link type="primary" v-if="scope.row.state !== 1" @click="openDialog('edit',scope.row)" >编辑</el-button> |
| | | <el-button link type="primary" @click="toChapters(scope.row)">章节</el-button> |
| | | <el-button link type="danger" v-if="scope.row.state !== 1" @click="handleDelete(scope.row)">删除</el-button> |
| | | <el-button link type="primary" v-if="scope.row.state !== 1" @click="openDialog('edit',scope.row)" v-hasPermi="['courseManage:list:edit']">编辑</el-button> |
| | | <el-button link type="primary" @click="toChapters(scope.row)">添加课程资源</el-button> |
| | | <el-button link type="danger" v-if="scope.row.state !== 1" @click="handleDelete(scope.row)" v-hasPermi="['courseManage:list:del']">删除</el-button> |
| | | </div> |
| | | <div v-else> |
| | | <el-button link type="primary" @click="toChapters(scope.row)">章节</el-button> |