实训案例管理 页面整理

zqqdev
CherrysChang 5 years ago
parent 5397512c25
commit c6e7e82243
  1. 30
      src/views/train/case-detail.vue
  2. 4
      src/views/train/case-list.vue

@ -29,11 +29,12 @@
</div> </div>
<div class="target-set"> <div class="target-set">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="1" style="text-align:center;padding-top: 182px;width: 76px;">量化指标</el-col>
<el-col :span="7">
<el-table ref="leftTable" :data="tableData.filter(data => !searchName || data.name.toLowerCase().includes(searchName.toLowerCase()))" <el-table ref="leftTable" :data="tableData.filter(data => !searchName || data.name.toLowerCase().includes(searchName.toLowerCase()))"
height="400" border highlight-current-row tooltip-effect="dark" @selection-change="handleSelectionChange"> height="400" border highlight-current-row tooltip-effect="dark" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="0/10"> <el-table-column label="未选择 10/10">
<el-table-column prop="name" label="名称" show-overflow-tooltip> <el-table-column prop="name" label="名称" show-overflow-tooltip>
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">
<el-input v-model="searchName" size="mini" placeholder="输入指标名称模糊搜索"/> <el-input v-model="searchName" size="mini" placeholder="输入指标名称模糊搜索"/>
@ -43,15 +44,15 @@
</el-table> </el-table>
</el-col> </el-col>
<el-col :span="1" style="text-align:center;padding-top: 160px;"> <el-col :span="1" style="text-align:center;padding-top: 160px;">
<el-button @click="addStaff" type="primary" icon="el-icon-arrow-right" circle></el-button> <el-button @click="addStaff" size="mini" type="primary" icon="el-icon-arrow-right" circle></el-button>
<el-button @click="removeStaff" type="primary" icon="el-icon-arrow-left" circle style="margin-left: 0;margin-top: 10px;"></el-button> <el-button @click="removeStaff" size="mini" type="primary" icon="el-icon-arrow-left" circle style="margin-left: 0;margin-top: 10px;"></el-button>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="14">
<el-table ref="rightTable" :data="tableData" height="400" border highlight-current-row tooltip-effect="dark" @selection-change="handleSelectionChange"> <el-table ref="rightTable" :data="tableData" height="400" border highlight-current-row tooltip-effect="dark" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="已选择 0/10,剩余可配置分数 90 分"> <el-table-column label="已选择 0/10,剩余可配置分数 90 分">
<el-table-column prop="name" label="名称"></el-table-column> <el-table-column prop="name" label="名称"></el-table-column>
<el-table-column prop="target" label="任务目标"> <el-table-column prop="target" label="任务目标" width="256">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item :prop="'tradeList.'+scope.$index+'.score'" :rules="dataRule.score" class="score-input" > <el-form-item :prop="'tradeList.'+scope.$index+'.score'" :rules="dataRule.score" class="score-input" >
<el-select size="small" style="width: 100px;"> <el-select size="small" style="width: 100px;">
@ -64,10 +65,10 @@
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="score" label="分数"> <el-table-column prop="score" label="分数" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item :prop="'tradeList.'+scope.$index+'.score'" :rules="dataRule.score" class="score-input"> <el-form-item :prop="'tradeList.'+scope.$index+'.score'" :rules="dataRule.score" class="score-input">
<el-input size="small" v-model.trim="scope.row.score" :disabled="formAction == 2" style="width: 160px;"></el-input> <el-input size="small" v-model.trim="scope.row.score" :disabled="formAction == 2" style="width: 120px;"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -77,17 +78,19 @@
</el-row> </el-row>
</div> </div>
</el-card> </el-card>
<div style="text-align: center;">
<el-form-item>
<el-button type="primary" @click="doAddCaseData()">确定</el-button>
<el-button @click="goBackList">取消</el-button>
</el-form-item>
</div>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
// import DictCaseData from "./dictCaseData";
// import DictTradeList from "./dictTradeList";
export default { export default {
name: 'case-detail', name: 'case-detail',
// components: {DictTradeList, DictCaseData},
data() { data() {
// //
var validateScore = (rule, value, callback) => { var validateScore = (rule, value, callback) => {
@ -132,9 +135,6 @@
}, { }, {
name: '王小虎', name: '王小虎',
}], }],
currentRowData: null,
currentPageData: [], //
yxData: [],
isShowData: false, isShowData: false,
tradeDialogVisible: false, tradeDialogVisible: false,
isShowTradeDelBtn: false, isShowTradeDelBtn: false,

@ -21,10 +21,10 @@
<el-input v-model="searchObj.name" placeholder="实训名称"></el-input> <el-input v-model="searchObj.name" placeholder="实训名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="doSearch">查询</el-button> <el-button type="primary" icon="el-icon-search" @click="doSearch">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="doNew">创建</el-button> <el-button type="primary" icon="el-icon-circle-plus-outline" @click="doNew">创建</el-button>
</el-form-item> </el-form-item>
<!--<el-form-item> <!--<el-form-item>
<el-button type="danger" @click="doBatchDel">批量删除</el-button> <el-button type="danger" @click="doBatchDel">批量删除</el-button>

Loading…
Cancel
Save