|
|
@ -1,124 +1,116 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-card v-if="showBack" shadow="hover" class="mgb20"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-page-header :content="'实验项目管理 / '+titleName" @back="goBack"></el-page-header> |
|
|
|
<el-card v-if="showBack" shadow="hover" class="mgb20"> |
|
|
|
</el-card> |
|
|
|
<el-page-header :content="'实验项目管理 / '+titleName" @back="goBack"></el-page-header> |
|
|
|
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="24"> |
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="flex-center mgb20"> |
|
|
|
<div class="flex-center mgb20"> |
|
|
|
<p class="hr_tag"></p> |
|
|
|
<p class="hr_tag"></p> |
|
|
|
<span>筛选</span> |
|
|
|
<span>筛选</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-form label-width="80px"> |
|
|
|
<el-form label-width="80px"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="创建人"> |
|
|
|
<el-form-item label="创建人"> |
|
|
|
<el-select v-model="queryData.founder" clearable placeholder="请选择创建人" |
|
|
|
<el-select v-model="queryData.founder" clearable placeholder="请选择创建人" |
|
|
|
@change="initData"> |
|
|
|
@change="initData"> |
|
|
|
<el-option v-for="(item,index) in founderList" :key="index" :label="item.label" |
|
|
|
<el-option v-for="(item,index) in founderList" :key="index" :label="item.label" |
|
|
|
:value="item.value"></el-option> |
|
|
|
:value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="状态"> |
|
|
|
<el-form-item label="状态"> |
|
|
|
<el-select v-model="queryData.state" clearable placeholder="请选择状态" @change="initData"> |
|
|
|
<el-select v-model="queryData.state" clearable placeholder="请选择状态" @change="initData"> |
|
|
|
<el-option v-for="(item,index) in stateList" :key="index" :label="item.label" |
|
|
|
<el-option v-for="(item,index) in stateList" :key="index" :label="item.label" |
|
|
|
:value="item.value"></el-option> |
|
|
|
:value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="权限"> |
|
|
|
<el-form-item label="权限"> |
|
|
|
<el-select v-model="queryData.permissions" placeholder="请选择" @change="initData"> |
|
|
|
<el-select v-model="queryData.permissions" placeholder="请选择" @change="initData"> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in permissionsList" |
|
|
|
v-for="item in permissionsList" |
|
|
|
:key="item.value" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
:value="item.value" |
|
|
|
></el-option> |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" |
|
|
|
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" |
|
|
|
v-model="keyword" clearable></el-input> |
|
|
|
v-model="keyword" clearable></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="24"> |
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
<el-card shadow="hover" class="mgb20"> |
|
|
|
<div class="flex-between mgb20"> |
|
|
|
<div class="flex-between mgb20"> |
|
|
|
<div class="flex-center"> |
|
|
|
<div class="flex-center"> |
|
|
|
<p class="hr_tag"></p> |
|
|
|
<p class="hr_tag"></p> |
|
|
|
<span>项目列表</span> |
|
|
|
<span>项目列表</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" round @click="add" class="mag">新增项目</el-button> |
|
|
|
<el-button type="primary" round @click="add" class="mag">新增项目</el-button> |
|
|
|
<el-button type="primary" round @click="delAllData">批量删除</el-button> |
|
|
|
<el-button type="primary" round @click="delAllData">批量删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="projectId" |
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="projectId" |
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" width="55" align="center"></el-table-column> |
|
|
|
<el-table-column type="selection" width="55" align="center"></el-table-column> |
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
<template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template> |
|
|
|
<template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column> |
|
|
|
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column> |
|
|
|
<el-table-column v-if='queryData.founder == 1' prop="schoolName" label="学校名字" align="center"></el-table-column> |
|
|
|
<el-table-column v-if='queryData.founder == 1' prop="schoolName" label="学校名字" align="center"></el-table-column> |
|
|
|
<el-table-column prop="founder" label="创建人" align="center"> |
|
|
|
<el-table-column prop="founder" label="创建人" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ founderKeys[scope.row.founder] }} |
|
|
|
{{ founderKeys[scope.row.founder] }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="权限" align="center"> |
|
|
|
<el-table-column label="权限" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ permissionsKeys[scope.row.permissions] }} |
|
|
|
{{ permissionsKeys[scope.row.permissions] }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> |
|
|
|
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> |
|
|
|
<el-table-column prop="status" label="状态" align="center"> |
|
|
|
<el-table-column prop="status" label="状态" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ stateKeys[scope.row.state] }} |
|
|
|
{{ stateKeys[scope.row.state] }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" @click="edit(scope.row)"> |
|
|
|
<el-button type="text" @click="edit(scope.row)"> |
|
|
|
编辑 |
|
|
|
编辑 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
<el-button type="text" @click="handleDelete(scope.row.projectId)"> |
|
|
|
<el-button type="text" @click="handleDelete(scope.row.projectId)"> |
|
|
|
删除 |
|
|
|
删除 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
<el-button type="text" @click="copyData(scope.row.projectId)">复制</el-button> |
|
|
|
<el-button type="text" @click="copyData(scope.row.projectId)">复制</el-button> |
|
|
|
<el-switch |
|
|
|
<el-switch |
|
|
|
v-model="scope.row.ztOpen" |
|
|
|
v-model="scope.row.ztOpen" |
|
|
|
:active-text="scope.row.ztOpen ? '关闭' : '启用'" |
|
|
|
:active-text="scope.row.ztOpen ? '关闭' : '启用'" |
|
|
|
:active-value="0" |
|
|
|
:active-value="0" |
|
|
|
:inactive-value="1" |
|
|
|
:inactive-value="1" |
|
|
|
style="margin: 0 10px 0 10px" |
|
|
|
style="margin: 0 10px 0 10px" |
|
|
|
@change="switchOff(scope.row)" |
|
|
|
@change="switchOff(scope.row)" |
|
|
|
></el-switch> |
|
|
|
></el-switch> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
<div class="pagination"> |
|
|
|
<div class="pagination"> |
|
|
|
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> |
|
|
|
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--复制对话框--> |
|
|
|
<!--复制对话框--> |
|
|
|
<el-dialog title="复制" :visible.sync="copyVisible" width="24%" center :close-on-click-modal="false"> |
|
|
|
<el-dialog title="复制" :visible.sync="copyVisible" width="24%" center :close-on-click-modal="false"> |
|
|
|