样式优化

master
yujialong 6 months ago
parent dae24e7cf7
commit eb85cf815f
  1. 59
      src/App.vue
  2. BIN
      src/assets/logo.png
  3. 26
      src/main.js
  4. 41
      src/styles/index.scss
  5. 0
      src/util/local.js
  6. 16
      src/util/rem.js
  7. 372
      src/views/Home.vue
  8. 315
      src/views/Program.vue
  9. 600
      src/views/Transaction.vue

@ -1,54 +1,53 @@
<template> <template>
<div id="app"> <div id="app">
<!-- <div id="nav"> <router-view />
<router-link to="/">Home</router-link> | </div>
<router-link to="/about">About</router-link>
</div> -->
<router-view />
</div>
</template> </template>
<script> <script>
export default { export default {
created () { created () {
//localStorage //localStorage
sessionStorage.getItem("userMsg") && this.$store.replaceState(Object.assign(this.$store.state,JSON.parse(sessionStorage.getItem("userMsg")))); sessionStorage.getItem("userMsg") && this.$store.replaceState(Object.assign(this.$store.state, JSON.parse(sessionStorage.getItem("userMsg"))));
//vuexsessionStorage //vuexsessionStorage
window.addEventListener("beforeunload",()=>{ window.addEventListener("beforeunload", () => {
sessionStorage.setItem("userMsg",JSON.stringify(this.$store.state)) sessionStorage.setItem("userMsg", JSON.stringify(this.$store.state))
}) })
} }
} }
</script> </script>
<style lang='scss'> <style lang='scss'>
#app { #app {
font-family: Avenir, Helvetica, Arial, sans-serif; font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
/* text-align: center; */ /* text-align: center; */
color: #2c3e50; color: #2c3e50;
/* background-color: #f8f7f7; */ /* background-color: #f8f7f7; */
height: 100%; height: 100%;
} }
body { body {
margin: 0; margin: 0;
background-color: #f8f7f7; background-color: #f8f7f7;
} }
/deep/.el-tree-node__content { /deep/.el-tree-node__content {
height: 20px!important; height: 20px !important;
} }
#nav { #nav {
padding: 30px; padding: 30px;
} }
#nav a { #nav a {
font-weight: bold; font-weight: bold;
color: #2c3e50; color: #2c3e50;
} }
#nav a.router-link-exact-active { #nav a.router-link-exact-active {
color: #42b983; color: #42b983;
} }
</style> </style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

@ -6,17 +6,17 @@ import ElementUI from 'element-ui'
import './assets/element-variables.scss' import './assets/element-variables.scss'
import core from '../src/utils/core' import core from '../src/utils/core'
import { import {
post, post,
get, get,
del, del,
put put
} from './utils/http'; } from './utils/http';
import api from './utils/api'; import api from './utils/api';
import './util/rem' import '@/styles/index.scss'
Vue.use(ElementUI); Vue.use(ElementUI);
Vue.prototype.core=core Vue.prototype.core = core
Vue.prototype.api = api; Vue.prototype.api = api;
Vue.prototype.$get = get; Vue.prototype.$get = get;
Vue.prototype.$post = post; Vue.prototype.$post = post;
@ -26,15 +26,15 @@ Vue.prototype.$put = put;
Vue.config.productionTip = false Vue.config.productionTip = false
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if (to.meta.title) { if (to.meta.title) {
document.title = to.meta.title document.title = to.meta.title
} }
next() next()
}) })
new Vue({ new Vue({
router, router,
store, store,
render: h => h(App) render: h => h(App)
}).$mount('#app') }).$mount('#app')

@ -0,0 +1,41 @@
.pagination {
margin: 20px 0;
text-align: right;
button,
.number {
color: rgba(0, 0, 0, 0.65) !important;
background-color: transparent !important;
border: 1px solid rgba(0, 0, 0, 0.15) !important;
border-radius: 4px !important;
}
button i {
color: #333;
}
.active {
color: #fff !important;
background-color: #9278ff !important;
}
}
.p-title {
padding-left: 5px;
margin: 0 0 24px;
line-height: 1;
font-size: 14px;
color: #585858;
border-left: 3px solid #9278ff;
}
::-webkit-scrollbar {
width: 12px;
height: 8px;
}
::-webkit-scrollbar-thumb {
width: 5px;
border-radius: 6px;
background: #d7d7d7;
}

@ -1,16 +0,0 @@
// rem等比适配配置文件
// 基准大小
const baseSize = 16
// 设置 rem 函数
function setRem () {
// 当前页面宽度相对于 1920宽的缩放比例,可根据自己需要修改。
const scale = document.documentElement.clientWidth / 1920
// 设置页面根节点字体大小(“Math.min(scale, 2)” 指最高放大比例为2,可根据实际业务需求调整)
document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px'
}
// 初始化
setRem()
// 改变窗口大小时重新设置 rem
window.onresize = function () {
setRem()
}

@ -1,82 +1,59 @@
<template> <template>
<div class="content"> <div class="wrap">
<div class="header flex"> <el-card shadow="hover">
<i class="el-icon-arrow-left" @click="back" style="cursor:pointer"> <el-page-header content="判分点设置" @back="back"></el-page-header>
<span>Back</span> <div class="tools">
</i> <el-input placeholder="请输入判分点名称" prefix-icon="el-icon-search" size="small" style="width: 300px;"
v-model="keyword" clearable></el-input>
<p>{{ systemName }} 判分点设置</p> <div>
</div> <el-button type="primary" size="small" round @click="toAdd">新增</el-button>
<div class="footer"> <el-button type="primary" size="small" round @click="batchDel">批量删除</el-button>
<div class="footer_h"> <el-button v-if="systemId == 19" type="primary" size="small" round @click="batchCopy">批量复制</el-button>
<div class="black" style="float: left"></div>
<p style="float: left">判分点列表</p>
</div>
<div class="flex footer_h">
<div style="width: 300px;float: left">
<el-input placeholder="请输入判分点名称" style="height: 33px;width:100%" prefix-icon="el-icon-search"
v-model="keyword" clearable></el-input>
</div>
<div style="float: right">
<el-button class="button" style="height: 33px;line-height: 0px" @click="HomepageJump()">新增</el-button>
<el-button class="button" style="height: 33px;line-height: 0px" @click="deletes()">批量删除</el-button>
<el-button v-if="systemId == 19" class="button" style="height: 33px;line-height: 0px"
@click="batchCopy">批量复制</el-button>
</div> </div>
</div> </div>
<div> <el-table ref="table" class="list" :data="tableData" :cell-style="rowClass" :header-cell-style="headClass"
<el-row> size="small" :stripe="true" header-align="center" @selection-change="handleSelectionChange">
<el-col :span="24"> <el-table-column type="selection" width="55">
<el-card shadow="hover"> </el-table-column>
<el-table :data="tableData" :cell-style="rowClass" :header-cell-style="headClass" :stripe="true" <el-table-column type="index" label="序号" width="80" align="center">
header-align="center" @selection-change="handleSelectionChange"> <template slot-scope="scope">{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</template>
<el-table-column type="selection" width="55"> </el-table-column>
</el-table-column> <el-table-column prop="name" label="判分点名称" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="80" align="center"> <el-table-column label="实验要求" align="center">
<template slot-scope="scope">{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</template> <template slot-scope="scope">
</el-table-column> <div class="ql-snow">
<el-table-column prop="name" label="判分点名称" align="center"></el-table-column> <div class="ql-editor" v-html="scope.row.experimentalRequirements"></div>
<el-table-column label="实验要求" align="center"> </div>
<template slot-scope="scope"> </template>
<div class="ql-snow"> </el-table-column>
<div class="ql-editor" v-html="scope.row.experimentalRequirements"></div> <el-table-column prop="operate" label="操作" align="center">
</div> <template slot-scope="scope">
</template> <el-button v-if="systemId == 19" @click="copy(scope.row)" type="text" size="small">复制</el-button>
</el-table-column> <el-button @click="handleEdit(scope.row)" type="text" size="small">编辑</el-button>
<el-button @click="handleDelete(scope.row)" type="text" size="small">删除</el-button>
<el-table-column prop="operate" label="操作" align="center"> </template>
<template slot-scope="scope"> </el-table-column>
<el-button v-if="systemId == 19" @click="copy(scope.row)" type="text" size="small">复制</el-button> <el-table-column prop="isOpen" label="是否启用" align="center" width="130">
<el-button @click="handleEdit(scope.row)" type="text" size="small">编辑</el-button> <template slot-scope="scope">
<el-button @click="handleDelete(scope.row)" type="text" size="small">删除</el-button> <el-switch v-model="scope.row.isOpen" :active-value="0" :inactive-value="1"
</template> @change="changeSwitch(scope.row)"></el-switch>
</el-table-column> </template>
<el-table-column prop="isOpen" label="是否启用" align="center" width="130"> </el-table-column>
<template slot-scope="scope"> </el-table>
<el-switch v-model="scope.row.isOpen" :active-value="0" :inactive-value="1"
@change="changeSwitch(scope.row)"></el-switch> <div class="pagination">
</template> <el-pagination background @current-change="handleCurrentChange" :current-page="pageNum" :page-size="10"
</el-table-column> layout="total,prev, pager, next, jumper" :total="dataTotal"></el-pagination>
</el-table>
</el-card>
</el-col>
</el-row>
<!-- 分页 -->
<div class="block">
<el-pagination background @current-change="handleCurrentChange" :current-page="pageNum" :page-size="10"
layout="total,prev, pager, next, jumper" :total="dataTotal"></el-pagination>
</div>
</div> </div>
</div> </el-card>
<el-dialog title="复制" :visible.sync="copyVisible" width="500px" center :close-on-click-modal="false"> <el-dialog title="复制" :visible.sync="copyVisible" width="500px" center :close-on-click-modal="false">
<el-form label-width="90px" v-loading="beforeCopying"> <el-form label-width="90px" v-loading="beforeCopying">
<el-form-item v-if="curRow" prop="name" label="判分点名称"> <el-form-item v-if="curRow" prop="name" label="判分点名称">
<el-input size="small" placeholder="请输入判分点名称" v-model="form.name"></el-input> <el-input size="small" placeholder="请输入判分点名称" v-model="form.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="checkpointId" label="关联关卡"> <el-form-item prop="checkpointId" label="复制至关卡">
<el-select size="small" v-model="form.checkpointId" placeholder="请选择关联关卡"> <el-select size="small" v-model="form.checkpointId" placeholder="请选择要复制至的关卡">
<el-option v-for="(item, i) in checkpoints" :key="i" :label="item.customsPassName" <el-option v-for="(item, i) in checkpoints" :key="i" :label="item.customsPassName"
:value="item.checkpointId"> :value="item.checkpointId">
</el-option> </el-option>
@ -100,7 +77,7 @@ export default {
keyword: '', keyword: '',
searchTimer: null, searchTimer: null,
tableData: [], tableData: [],
dataTotal: 0, // () dataTotal: 0,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
@ -124,7 +101,8 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.pageNum = 1; this.$refs.table.clearSelection()
this.pageNum = 1
this.initData() this.initData()
}, 500) }, 500)
}, },
@ -142,6 +120,7 @@ export default {
}, },
methods: { methods: {
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.$refs.table.clearSelection()
this.pageNum = val; this.pageNum = val;
this.initData(); this.initData();
}, },
@ -172,17 +151,14 @@ export default {
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
} }
}).catch(err => { }).catch(err => { });
console.log(err);
});
}, },
// //
handleSelectionChange (val) { handleSelectionChange (val) {
console.log(val)
this.multipleSelection = val; this.multipleSelection = val;
}, },
// //
deletes () { batchDel () {
let bcIdList = []; let bcIdList = [];
let nameList = []; let nameList = [];
let lcIdList = []; let lcIdList = [];
@ -226,16 +202,9 @@ export default {
if (this.nameList.length === this.tableData.length && this.pageNum > 1) { if (this.nameList.length === this.tableData.length && this.pageNum > 1) {
this.handleCurrentChange(this.pageNum - 1) this.handleCurrentChange(this.pageNum - 1)
} }
}).catch(() => { }).catch(() => { });
this.$message.info("已取消删除");
});
} else { } else {
this.$alert('请选择需要删除的判分点', '提示', { this.$message.error('请选择数据')
confirmButtonText: '好的',
callback: action => {
}
});
} }
}, },
getProgrammingClassData (params) { // getProgrammingClassData (params) { //
@ -246,31 +215,20 @@ export default {
}); });
}, },
getCHProgrammingClassData () { getCHProgrammingClassData () {
let systemId = this.$route.query.systemId const { query } = this.$route
let userId = this.$route.query.userId this.$post(`${this.api.QueryPointOfJudgement}?systemId=${query.systemId}&userId=${query.userId}&pageNum=${query.pageNum}&pageSize=${query.pageSize}&queryName=${query.queryName}&userIdList=${query.userIdList}`).then(res => {
let pageNum = this.$route.query.pageNum
let pageSize = this.$route.query.pageSize
let queryName = this.$route.query.queryName
let userIdList = this.$route.query.userIdList
this.$post(`${this.api.QueryPointOfJudgement}?systemId=${systemId}&userId=${userId}&pageNum=${pageNum}&pageSize=${pageSize}&queryName=${queryName}&userIdList=${userIdList}`).then(res => {
this.tableData = res.message.records; this.tableData = res.message.records;
this.dataTotal = res.message.total; this.dataTotal = res.message.total;
}).catch(err => { }).catch(err => { });
console.log(err);
});
}, },
HomepageJump () { // //
if (this.isProcess) { toAdd () {
// this.$router.push(`${this.isProcess ? 'Transaction' : 'program'}?isAdd=true&systemId=${this.systemId}`)
this.$router.push(`Transaction?isAdd=true&systemId=${this.systemId}`);
} else {
//
this.$router.push(`program?isAdd=true&systemId=${this.systemId}`);
}
}, },
// //
batchCopy () { batchCopy () {
if (this.multipleSelection.length) { if (this.multipleSelection.length) {
//
this.form = { this.form = {
name: '', name: '',
checkpointId: '', checkpointId: '',
@ -278,7 +236,21 @@ export default {
this.curRow = null this.curRow = null
this.copyVisible = true this.copyVisible = true
} else { } else {
this.$message.warning("请先选择数据 !"); //
this.$confirm('当前未选中任何数据,是否需要复制当前列表的全部数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const res = await this.$post(this.api.queryAllJudgmentPoint, {
name: this.keyword,
pageNum: 1,
pageSize: 1000,
systemId: this.systemId
})
this.multipleSelection = res.message.records
this.batchCopy()
}).catch(() => { })
} }
}, },
// //
@ -430,182 +402,40 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .ql-toolbar { .wrap {
height: 0; padding: 20px;
padding: 0;
border-bottom: 0;
}
//
.footer /deep/ .el-pagination span:not([class*='suffix']),
.el-pagination button {
font-size: 16px;
margin-right: 30px;
}
.footer /deep/ .el-pagination {
text-align: right;
margin: 20px 0 0 0;
}
/deep/ .el-button {
//line-height: 33px;
//height: 33px;
}
.footer {
background-color: #ffffff;
margin-top: 10px;
padding: 10px 20px 20px 20px;
}
.footer_h {
position: relative;
height: 50px;
line-height: 50px;
}
.footer_h .black {
width: 8px;
height: 18px;
background-color: #333;
margin-top: 15px;
}
.footer_h p {
padding-left: 10px;
// padding-right: 980px;
font-size: 14px;
font-weight: 600;
margin: 0;
}
//
.footer /deep/ .el-textarea__inner {
height: 60px;
width: 540px;
resize: none;
border: 1px solid #9278ff;
font-size: 12px;
border-radius: 5px;
}
.footer /deep/ .el-textarea__inner:hover {
border: 1px solid #9278ff;
}
.footer /deep/ .el-table th.is-leaf,
.el-table td {
border-bottom: none;
}
.footer /deep/ .el-table--group::after,
.el-table--border::after,
.el-table::before {
background: rgba(255, 255, 255, 1);
}
//
/deep/ ::-webkit-scrollbar {
width: 6px; //
height: 6px; //
}
//
/deep/ ::-webkit-scrollbar-thumb {
background-color: #9278ff;
border-radius: 3px;
-webkit-box-shadow: inset 0 0 5px #dddddd;
}
/deep/ ::-webkit-scrollbar-track {
/*滚动条里面轨道*/
-webkit-box-shadow: inset 0 0 5px #dddddd;
border-radius: 0;
background: #dddddd;
} }
.footer /deep/ .el-card__body { .tools {
padding: 0;
}
.footer /deep/ .el-card {
border: none;
}
.footer /deep/ .el-table th {
font-size: 14px;
font-family: Microsoft YaHei;
color: rgba(255, 255, 255, 1);
background-color: #9278ff;
}
.footer /deep/ .el-table--striped .el-table__body tr.el-table__row--striped td {
background-color: #f5f2ff;
}
.footer /deep/ .el-button--text {
padding-right: 20px;
color: #9278ff;
}
.footer /deep/ .el-button--text:focus,
.el-button--text:hover {
color: #9278ff;
}
.button {
margin: 7px;
border: none;
background-color: #9278ff;
color: #ffffff;
border-radius: 20px;
float: right;
}
.button:focus {
outline: 0;
}
.header /deep/ [class*=' el-icon-'],
[class^='el-icon-'] {
line-height: 3;
padding-left: 10px;
}
.header {
display: flex; display: flex;
background-color: #ffffff; justify-content: space-between;
height: 50px; margin: 20px 0;
font-size: 12px;
line-height: 50px;
font-weight: 600;
} }
.header span { /deep/ .ql-toolbar {
font-size: 16px; height: 0;
font-weight: 600; padding: 0;
padding-left: 5px; border-bottom: 0;
} }
.header p { /deep/.list.el-table {
font-size: 14px; border-radius: 8px;
padding-left: 20px; border: 1px solid rgba(0, 0, 0, 0.06);
margin: 0; border-bottom: 0;
}
.flex { .cell {
//display: flex; font-size: 12px;
justify-content: flex-start; line-height: 35px;
} }
.flex-end { th {
//display: flex; background: #9278ff !important;
justify-content: flex-end;
}
.content { .cell {
position: relative; color: #fff;
top: 10px; font-size: 14px;
font-weight: normal;
}
}
} }
</style> </style>

@ -1,179 +1,106 @@
<template> <template>
<!-- 编程类 --> <!-- 编程类 -->
<div class="content"> <div class="wrap">
<div class="header"> <el-card shadow="hover">
<div> <div class="header">
<i class="back el-icon-arrow-left" <div>
@click="Back()" <el-page-header content="判分点设置" @back="back"></el-page-header>
style="cursor:pointer"> </div>
<span>Back</span> <div>
</i> <el-button v-if="!isView" type="primary" size="mini" @click="submit">保存</el-button>
<span class="title">判分点设置</span> </div>
</div>
<div>
<el-button v-if="!isView"
type="primary"
size="mini"
@click="submit">保存</el-button>
</div> </div>
</div> </el-card>
<!--基本信息--> <!--基本信息-->
<div> <el-card shadow="hover" style="margin: 20px 0;">
<div class="form-con"> <div class="form-con">
<div class="title"> <p class="p-title">基本信息</p>
<div class="black"></div>
<div>基本信息</div>
</div>
<div class="item"> <div class="item">
<div class="label">判分点</div> <div class="label">判分点</div>
<el-input v-model.trim="formData.points.name" <el-input v-model.trim="formData.points.name" :readonly="isView" @blur="handleBlur" placeholder="请输入内容"
:readonly="isView" clearable style="width: 400px"></el-input>
@blur="handleBlur"
placeholder="请输入内容"
clearable
style="width: 400px"></el-input>
</div> </div>
<div class="item"> <div class="item">
<div class="label">实验要求</div> <div class="label">实验要求</div>
<quill class="quill" <quill class="quill" v-model="formData.points.experimentalRequirements"
v-model="formData.points.experimentalRequirements" :type.sync="formData.points.experimentalRequirementsType" :readonly="isView" :border="true" :minHeight="150"
:type.sync="formData.points.experimentalRequirementsType" :height="150" />
:readonly="isView"
:border="true"
:minHeight="150"
:height="150" />
</div> </div>
</div> </div>
</el-card>
<!--实验代码--> <!--实验代码-->
<el-card shadow="hover">
<div class="form-con"> <div class="form-con">
<div class="title"> <p class="p-title">实验代码</p>
<div class="black"></div>
<div>实验代码</div>
</div>
<p style="text-align: center;">参考答案</p> <p style="text-align: center;">参考答案</p>
<div> <div>
<quill v-model="formData.points.experimentCode" <quill v-model="formData.points.experimentCode" :type.sync="formData.points.experimentCodeType"
:type.sync="formData.points.experimentCodeType" :readonly="isView" :border="true" :minHeight="300" :height="300" :index="1" />
:readonly="isView"
:border="true"
:minHeight="300"
:height="300"
:index="1" />
</div> </div>
</div> </div>
</el-card>
<!--判分规则--> <!--判分规则-->
<div class="rule-con"> <el-card shadow="hover" style="margin-top: 20px;">
<div class="title-con"> <div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 20px;">
<div class="title"> <p class="p-title" style="margin-bottom: 0;">判分规则</p>
<div class="black"></div> <div>
<div>判分规则</div> <el-button v-if="!isView" type="primary" size="mini" @click="batchDel">批量删除</el-button>
</div> <el-button v-if="!isView" type="primary" size="mini" @click="saveAll">一键保存</el-button>
<div> <el-button v-if="!isView" type="primary" size="mini" @click="addRule">新增</el-button>
<el-button v-if="!isView"
type="primary"
size="mini"
@click="batchDel">批量删除</el-button>
<el-button v-if="!isView"
type="primary"
size="mini"
@click="saveAll">一键保存</el-button>
<el-button v-if="!isView"
type="primary"
size="mini"
@click="addRule">新增</el-button>
</div>
</div> </div>
<el-card shadow="hover">
<el-table class="lc-table"
:data="tableData"
:stripe="true"
:cell-style="rowClass"
header-align="center"
:header-cell-style="headClass"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55">
</el-table-column>
<el-table-column prop="id"
type="index"
label="序号"
width="80">
<template slot-scope="scope">
{{ scope.row.isSubject && scope.row.index + 1 }}
</template>
</el-table-column>
<el-table-column label="编译器中正确答案"
align="center">
<template slot-scope="scope"
v-if="scope.row.isSubject">
<p class="p">字段一致性规则用户编辑器中至少出现如下语句</p>
<el-input type="textarea"
:rows="3"
v-model="scope.row.required"
:disabled="isView || scope.row.isDisabled"></el-input>
</template>
</el-table-column>
<el-table-column label=" "
width="150">
<template slot-scope="scope">
<el-button circle
type="primary"
v-if="scope.row.isSubject"
:disabled="isView || scope.row.isDisabled"
@click="changeResult(scope.row)"
style="position: absolute; right: 55px">
{{ scope.row.resultOperation === 0 ? '且' : '或' }}
</el-button>
<el-button v-else
type="primary"
circle
@click="changeRule(scope.row, scope.$index)">
{{ scope.row.ruleOperation === 0 ? "且" : "或" }}
</el-button>
</template>
</el-table-column>
<el-table-column label="终端中正确答案"
align="center">
<template slot-scope="scope"
v-if="scope.row.isSubject">
<p class="p">运行结果一致性规则用户运行结果需要与下方代码运行结果一致</p>
<el-input type="textarea"
:rows="3"
v-model="scope.row.result"
:disabled="isView || scope.row.isDisabled"></el-input>
</template>
</el-table-column>
<el-table-column label="操作"
width="300"
v-if="!isView">
<template slot-scope="scope"
v-if="scope.row.isSubject">
<el-button v-show="scope.row.isDisabled"
size="mini"
type="text"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button v-show="!scope.row.isDisabled"
size="mini"
type="text"
@click="handleSave(scope.row)">保存</el-button>
<el-button v-show="!scope.row.isDisabled"
size="mini"
type="text"
@click="handleCancel(scope.row, scope.$index)">取消</el-button>
<el-button v-show="scope.row.isDisabled"
size="mini"
type="text"
@click="handleDelete(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div> </div>
</div>
<el-table class="lc-table" :data="tableData" :stripe="true" :cell-style="rowClass" header-align="center"
:header-cell-style="headClass" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column prop="id" type="index" label="序号" width="80">
<template slot-scope="scope">
{{ scope.row.isSubject && scope.row.index + 1 }}
</template>
</el-table-column>
<el-table-column label="编译器中正确答案" align="center">
<template slot-scope="scope" v-if="scope.row.isSubject">
<p class="p">字段一致性规则用户编辑器中至少出现如下语句</p>
<el-input type="textarea" :rows="3" v-model="scope.row.required"
:disabled="isView || scope.row.isDisabled"></el-input>
</template>
</el-table-column>
<el-table-column label=" " width="150">
<template slot-scope="scope">
<el-button circle type="primary" v-if="scope.row.isSubject" :disabled="isView || scope.row.isDisabled"
@click="changeResult(scope.row)" style="position: absolute; right: 55px">
{{ scope.row.resultOperation === 0 ? '且' : '或' }}
</el-button>
<el-button v-else type="primary" circle @click="changeRule(scope.row, scope.$index)">
{{ scope.row.ruleOperation === 0 ? "且" : "或" }}
</el-button>
</template>
</el-table-column>
<el-table-column label="终端中正确答案" align="center">
<template slot-scope="scope" v-if="scope.row.isSubject">
<p class="p">运行结果一致性规则用户运行结果需要与下方代码运行结果一致</p>
<el-input type="textarea" :rows="3" v-model="scope.row.result"
:disabled="isView || scope.row.isDisabled"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="300" v-if="!isView">
<template slot-scope="scope" v-if="scope.row.isSubject">
<el-button v-show="scope.row.isDisabled" size="mini" type="text"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button v-show="!scope.row.isDisabled" size="mini" type="text"
@click="handleSave(scope.row)">保存</el-button>
<el-button v-show="!scope.row.isDisabled" size="mini" type="text"
@click="handleCancel(scope.row, scope.$index)">取消</el-button>
<el-button v-show="scope.row.isDisabled" size="mini" type="text"
@click="handleDelete(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div> </div>
</template> </template>
@ -224,7 +151,7 @@ export default {
} }
}, },
methods: { methods: {
Back () { // back () { //
this.$router.back(); this.$router.back();
}, },
getInfoData (bcId) { // getInfoData (bcId) { //
@ -368,7 +295,7 @@ export default {
this.$post(this.api.addBcJudgmentPoint, this.formData).then(res => { this.$post(this.api.addBcJudgmentPoint, this.formData).then(res => {
if (res.status === 200) { if (res.status === 200) {
this.$message.success("新增判分点成功"); this.$message.success("新增判分点成功");
this.Back(); this.back();
} else { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
} }
@ -379,7 +306,7 @@ export default {
this.$post(this.api.updateBcJudgmentPoint, this.formData).then(res => { this.$post(this.api.updateBcJudgmentPoint, this.formData).then(res => {
if (res.status === 200) { if (res.status === 200) {
this.$message.success("更新判分点成功"); this.$message.success("更新判分点成功");
this.Back(); this.back();
} else { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
} }
@ -537,35 +464,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .wrap {
position: relative; padding: 20px;
top: 10px;
padding: 0 10px;
background-color: #ffffff;
.header { .header {
border-bottom: 1px dashed #ccc;
height: 45px;
line-height: 45px;
font-size: 12px;
font-weight: 600;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.back {
line-height: 3;
span {
font-size: 16px;
font-weight: 600;
padding-left: 5px;
}
}
.title {
font-weight: bold;
font-size: 14px;
margin-left: 20px;
}
} }
// //
@ -596,47 +500,12 @@ export default {
padding-right: 20px; padding-right: 20px;
line-height: 35px; line-height: 35px;
} }
.quill { .quill {
width: calc(100% - 240px); width: calc(100% - 240px);
} }
} }
} }
//
.rule-con {
padding-bottom: 60px;
.title-con {
height: 60px;
display: flex;
justify-content: space-between;
align-items: center;
.title {
display: flex;
.black {
width: 8px;
height: 18px;
background-color: #333;
margin-right: 10px;
}
}
}
}
}
//
/deep/ ::-webkit-scrollbar {
width: 6px; //
height: 6px; //
}
//
/deep/ ::-webkit-scrollbar-thumb {
background-color: #9278ff;
border-radius: 3px;
-webkit-box-shadow: inset 0 0 5px #dddddd;
} }
/deep/.lc-table { /deep/.lc-table {
@ -646,15 +515,12 @@ export default {
} }
} }
} }
/deep/ ::-webkit-scrollbar-track {
/*滚动条里面轨道*/
-webkit-box-shadow: inset 0 0 5px #dddddd;
border-radius: 0;
background: #dddddd;
}
.tree-con { .tree-con {
height: 230px; height: 230px;
position: relative; position: relative;
.mask { .mask {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -678,6 +544,7 @@ export default {
height: 230px; height: 230px;
background-color: #fff; background-color: #fff;
overflow: auto; overflow: auto;
.line { .line {
display: flex; display: flex;
align-items: center; align-items: center;

@ -1,24 +1,20 @@
<template> <template>
<!-- 交易类 --> <!-- 交易类 -->
<div class="content" v-loading="loading" element-loading-text="加载中" element-loading-spinner="el-icon-loading"> <div class="wrap" v-loading="loading" element-loading-text="加载中" element-loading-spinner="el-icon-loading">
<div class="header"> <el-card shadow="hover">
<div> <div class="header">
<i class="back el-icon-arrow-left" @click="Back()" style="cursor:pointer"> <div>
<span>Back</span> <el-page-header content="判分点设置" @back="back"></el-page-header>
</i> </div>
<span class="title">判分点设置</span> <div>
</div> <el-button v-if="!isView" type="primary" size="mini" @click="submit">保存</el-button>
<div> </div>
<el-button v-if="!isView" type="primary" size="mini" @click="submit">保存</el-button>
</div> </div>
</div> </el-card>
<div> <el-card shadow="hover" style="margin: 20px 0;">
<div class="form-con"> <div class="form-con">
<div class="title"> <p class="p-title">基本信息</p>
<div class="black"></div>
<div>基本信息</div>
</div>
<div class="item"> <div class="item">
<div class="label">判分点</div> <div class="label">判分点</div>
<el-input v-model.trim="formData.lcJudgmentPoint.name" :readonly="isView" @blur="handleBlur" <el-input v-model.trim="formData.lcJudgmentPoint.name" :readonly="isView" @blur="handleBlur"
@ -30,14 +26,11 @@
:border="true" :minHeight="150" :height="150" /> :border="true" :minHeight="150" :height="150" />
</div> </div>
</div> </div>
</el-card>
<el-card shadow="hover">
<div class="rule-con"> <div class="rule-con">
<div class="title-con"> <p class="p-title">判分规则</p>
<div class="title">
<div class="black"></div>
<div>判分规则</div>
</div>
</div>
<el-dialog :visible.sync="configVisible" width="25%" title="批量新增判分点" center :append-to-body="false"> <el-dialog :visible.sync="configVisible" width="25%" title="批量新增判分点" center :append-to-body="false">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div style="width: 100%;height: 400px;overflow: auto;margin: auto;background: #F5F5F5"> <div style="width: 100%;height: 400px;overflow: auto;margin: auto;background: #F5F5F5">
@ -57,266 +50,261 @@
</span> </span>
</el-dialog> </el-dialog>
<el-card shadow="hover" style="margin-bottom: 20px"> <div class="business-wrap">
<div class="business-wrap"> <div class="business">
<div class="business"> <div class="label">{{ isSt ? '关卡' : '业务' }}</div>
<div class="label">{{ isSt ? '关卡' : '业务' }}</div> <el-select v-model="formData.lcJudgmentPoint.business" :placeholder="'请选择' + (isSt ? '关卡' : '业务')">
<el-select v-model="formData.lcJudgmentPoint.business" :placeholder="'请选择' + (isSt ? '关卡' : '业务')"> <el-option v-for="(item, i) in businessList" :key="i" :label="item.name" :value="item.id"></el-option>
<el-option v-for="(item, i) in businessList" :key="i" :label="item.name" :value="item.id"></el-option> </el-select>
</el-select> </div>
</div> <div>
<div> <el-button v-if="!isView" type="primary" size="mini" @click="batchDel">批量删除</el-button>
<el-button v-if="!isView" type="primary" size="mini" @click="batchDel">批量删除</el-button> <el-button v-if="!isView" type="primary" size="mini" @click="saveAll">一键保存</el-button>
<el-button v-if="!isView" type="primary" size="mini" @click="saveAll">一键保存</el-button> <el-button v-if="!isView" type="primary" size="mini" @click="addRules">新增</el-button>
<el-button v-if="!isView" type="primary" size="mini" @click="addRules">新增</el-button>
</div>
</div> </div>
</el-card> </div>
<el-card shadow="hover"> <el-table class="lc-table" :data="tableData" :stripe="true" row-key="i" header-align="center"
<el-table class="lc-table" :data="tableData" :stripe="true" row-key="i" header-align="center" @selection-change="handleSelectionChange">
@selection-change="handleSelectionChange"> <el-table-column type="selection" width="55">
<el-table-column type="selection" width="55"> </el-table-column>
</el-table-column> <el-table-column prop="indexNo" type="index" label="序号" width="80">
<el-table-column prop="indexNo" type="index" label="序号" width="80"> <template slot-scope="scope">
<template slot-scope="scope"> {{ scope.row.isSubject && scope.row.index + 1 }}
{{ scope.row.isSubject && scope.row.index + 1 }} </template>
</template> </el-table-column>
</el-table-column> <el-table-column label="流程类考核点">
<el-table-column label="流程类考核点"> <template slot-scope="scope" v-if="scope.row.isSubject">
<template slot-scope="scope" v-if="scope.row.isSubject"> <p class="p">操作一致性规则用户完成的功能操作与下方设置的操作点一致</p>
<p class="p">操作一致性规则用户完成的功能操作与下方设置的操作点一致</p> <div class="tree-con">
<div class="tree-con"> <div class="block1" :id="'divTree' + scope.$index">
<div class="block1" :id="'divTree' + scope.$index"> <el-tree :data="scope.row.operationIData" :props="defaultProp" :default-expand-all="true"></el-tree>
<el-tree :data="scope.row.operationIData" :props="defaultProp" :default-expand-all="true"></el-tree>
</div>
<div v-show="scope.row.isDisabled" class="mask"></div>
</div> </div>
</template> <div v-show="scope.row.isDisabled" class="mask"></div>
</el-table-column> </div>
<el-table-column label=" " width="150" align="center"> </template>
<template slot-scope="scope"> </el-table-column>
<el-button circle type="primary" v-if="scope.row.isSubject" <el-table-column label=" " width="150" align="center">
:disabled="isSt || isView || scope.row.isDisabled" @click="changeResult(scope.row)"> <template slot-scope="scope">
{{ scope.row.resultOperation === 0 ? "且" : "或" }} <el-button circle type="primary" v-if="scope.row.isSubject"
</el-button> :disabled="isSt || isView || scope.row.isDisabled" @click="changeResult(scope.row)">
<el-button v-else type="primary" circle @click="changeRule(scope.row, scope.$index)"> {{ scope.row.resultOperation === 0 ? "且" : "或" }}
{{ scope.row.ruleOperation === 0 ? "且" : "或" }} </el-button>
</el-button> <el-button v-else type="primary" circle @click="changeRule(scope.row, scope.$index)">
</template> {{ scope.row.ruleOperation === 0 ? "且" : "或" }}
</el-table-column> </el-button>
<el-table-column label="正确答案"> </template>
<template slot-scope="scope" v-if="scope.row.isSubject"> </el-table-column>
<p class="p" style="margin-top: 1px">交易结果一致性规则用户交易结果需要与下面设置的交易结果指标要求一致</p> <el-table-column label="正确答案">
<div class="block"> <template slot-scope="scope" v-if="scope.row.isSubject">
<!-- type: 题目类型(1选择 2判断 3填空 4问答 5指标结果) --> <p class="p" style="margin-top: 1px">交易结果一致性规则用户交易结果需要与下面设置的交易结果指标要求一致</p>
<div v-if="scope.row.operationIds && scope.row.type == null" <div class="block">
style="line-height: 65px;text-align: center">需点击</div> <!-- type: 题目类型(1选择 2判断 3填空 4问答 5指标结果) -->
<template v-if="scope.row.type == 1"> <div v-if="scope.row.operationIds && scope.row.type == null"
<div class="box"> style="line-height: 65px;text-align: center">需点击</div>
<div class="line"> <template v-if="scope.row.type == 1">
<div>{{ scope.row.name }}</div> <div class="box">
</div> <div class="line">
<div class="line"> <div>{{ scope.row.name }}</div>
<span class="label mini">正确答案</span> </div>
<div class="action"> <div class="line">
<!--multiple:多选--> <span class="label mini">正确答案</span>
<el-select v-model="scope.row.value1" :disabled="isView || scope.row.isDisabled" size="mini" <div class="action">
:multiple="isSt" style="width: 100%;overflow: hidden;"> <!--multiple:多选-->
<el-option v-for="(item, i) in isSt ? scope.row.stItems : scope.row.lcItems" :key="i" <el-select v-model="scope.row.value1" :disabled="isView || scope.row.isDisabled" size="mini"
:label="item.options" :value="item.itemId"></el-option> :multiple="isSt" style="width: 100%;overflow: hidden;">
</el-select> <el-option v-for="(item, i) in isSt ? scope.row.stItems : scope.row.lcItems" :key="i"
</div> :label="item.options" :value="item.itemId"></el-option>
</el-select>
</div> </div>
</div> </div>
</template> </div>
</template>
<template v-if="scope.row.type == 2"> <template v-if="scope.row.type == 2">
<div class="box"> <div class="box">
<div class="line"> <div class="line">
<div>{{ scope.row.name }}</div> <div>{{ scope.row.name }}</div>
</div> </div>
<div class="line"> <div class="line">
<span class="label mini">正确答案</span> <span class="label mini">正确答案</span>
<div class="action"> <div class="action">
<el-select v-model="scope.row.value1" :disabled="isView || scope.row.isDisabled" size="mini" <el-select v-model="scope.row.value1" :disabled="isView || scope.row.isDisabled" size="mini"
style="width: 100%;"> style="width: 100%;">
<el-option v-for="(item, i) in scope.row.lcItems" :key="i" :label="item.options" <el-option v-for="(item, i) in scope.row.lcItems" :key="i" :label="item.options"
:value="item.subjectId"></el-option> :value="item.subjectId"></el-option>
</el-select> </el-select>
</div>
</div> </div>
</div> </div>
</template> </div>
</template>
<template v-if="scope.row.type == 3">
<div class="box"> <template v-if="scope.row.type == 3">
<div class="line" style="min-height: 100%;"> <div class="box">
<span class="label"> <div class="line" style="min-height: 100%;">
<!--<el-checkbox v-model="scope.row.fieldOfReq" :disabled="isView || scope.row.isDisabled">字段要求</el-checkbox>--> <span class="label">
字段要求 <!--<el-checkbox v-model="scope.row.fieldOfReq" :disabled="isView || scope.row.isDisabled">字段要求</el-checkbox>-->
</span> 字段要求
<div class="action"> </span>
<el-input class="mini-textarea" type="textarea" rows="6" size="mini" <div class="action">
v-model.trim="scope.row.value1" :disabled="isView || scope.row.isDisabled" <el-input class="mini-textarea" type="textarea" rows="6" size="mini"
placeholder="字段之间以逗号隔开"></el-input> v-model.trim="scope.row.value1" :disabled="isView || scope.row.isDisabled"
</div> placeholder="字段之间以逗号隔开"></el-input>
</div> </div>
</div> </div>
</template> </div>
</template>
<template v-if="scope.row.type == 4">
<div class="box"> <template v-if="scope.row.type == 4">
<div class="line"> <div class="box">
<span class="label"> <div class="line">
<!--<el-checkbox v-model="scope.row.numOfWords" :disabled="isView || scope.row.isDisabled">字数要求</el-checkbox>--> <span class="label">
字数要求 <!--<el-checkbox v-model="scope.row.numOfWords" :disabled="isView || scope.row.isDisabled">字数要求</el-checkbox>-->
</span> 字数要求
<div class="action a-line"> </span>
<el-select v-model="scope.row.value1" :disabled="isView || scope.row.isDisabled" size="mini"> <div class="action a-line">
<el-option label=">" value=">"></el-option> <el-select v-model="scope.row.value1" :disabled="isView || scope.row.isDisabled" size="mini">
<el-option label="<" value="<"></el-option> <el-option label=">" value=">"></el-option>
<el-option label="=" value="="></el-option> <el-option label="<" value="<"></el-option>
<el-option label=">=" value=">="></el-option> <el-option label="=" value="="></el-option>
<el-option label="<=" value="<="></el-option> <el-option label=">=" value=">="></el-option>
<el-option label="无限制" value="无限制"></el-option> <el-option label="<=" value="<="></el-option>
</el-select> <el-option label="无限制" value="无限制"></el-option>
<el-input class="number-input" v-model.trim="scope.row.value2" </el-select>
:disabled="isView || scope.row.isDisabled" onkeyup="value=this.value.replace(/\D+/g,'')" <el-input class="number-input" v-model.trim="scope.row.value2"
oninput="value=value.replace(/[^0-9.]/g,'')" type="number" min="1" size="mini" :disabled="isView || scope.row.isDisabled" onkeyup="value=this.value.replace(/\D+/g,'')"
style="margin-left: 5px;"></el-input> oninput="value=value.replace(/[^0-9.]/g,'')" type="number" min="1" size="mini"
</div> style="margin-left: 5px;"></el-input>
</div> </div>
<div class="line"> </div>
<span class="label"> <div class="line">
<!--<el-checkbox v-model="scope.row.fieldOfReq" :disabled="isView || scope.row.isDisabled">字段要求</el-checkbox>--> <span class="label">
字段要求 <!--<el-checkbox v-model="scope.row.fieldOfReq" :disabled="isView || scope.row.isDisabled">字段要求</el-checkbox>-->
</span> 字段要求
<div class="action"> </span>
<el-input class="mini-textarea" type="textarea" rows="5" size="mini" <div class="action">
v-model.trim="scope.row.value3" :disabled="isView || scope.row.isDisabled" <el-input class="mini-textarea" type="textarea" rows="5" size="mini"
placeholder="字段之间以逗号隔开"></el-input> v-model.trim="scope.row.value3" :disabled="isView || scope.row.isDisabled"
</div> placeholder="字段之间以逗号隔开"></el-input>
</div> </div>
</div> </div>
</template> </div>
</template>
<template v-if="scope.row.type == 5"> <template v-if="scope.row.type == 5">
<div class="box" style="padding: 0;"> <div class="box" style="padding: 0;">
<div class="line"> <div class="line">
<div>{{ scope.row.name }}</div> <div>{{ scope.row.name }}</div>
</div> </div>
<div class="line" style="flex-direction: column;"> <div class="line" style="flex-direction: column;">
<p class="label">交易指标区间</p> <p class="label">交易指标区间</p>
<div class="action"> <div class="action">
<div class="inputs range"> <div class="inputs range">
<el-select v-model="scope.row.value2" :disabled="isView || scope.row.isDisabled" size="mini" <el-select v-model="scope.row.value2" :disabled="isView || scope.row.isDisabled" size="mini"
clearable placeholder="符号"> clearable placeholder="符号">
<el-option v-for="(item, i) in leftSymbols" :key="i" :value="item.name"></el-option> <el-option v-for="(item, i) in leftSymbols" :key="i" :value="item.name"></el-option>
</el-select> </el-select>
<el-input class="number-input" v-model.trim="scope.row.value3" <el-input class="number-input" v-model.trim="scope.row.value3"
:disabled="isView || scope.row.isDisabled" size="mini" placeholder="数值" /> :disabled="isView || scope.row.isDisabled" size="mini" placeholder="数值" />
<el-input class="number-input" v-model.trim="scope.row.value4" <el-input class="number-input" v-model.trim="scope.row.value4"
:disabled="isView || scope.row.isDisabled" size="mini" placeholder="单位" /> :disabled="isView || scope.row.isDisabled" size="mini" placeholder="单位" />
<span>~</span> <span>~</span>
<el-input class="number-input" v-model.trim="scope.row.value5" <el-input class="number-input" v-model.trim="scope.row.value5"
:disabled="isView || scope.row.isDisabled" size="mini" placeholder="数值" /> :disabled="isView || scope.row.isDisabled" size="mini" placeholder="数值" />
<el-input class="number-input" v-model.trim="scope.row.value6" <el-input class="number-input" v-model.trim="scope.row.value6"
:disabled="isView || scope.row.isDisabled" size="mini" placeholder="单位" /> :disabled="isView || scope.row.isDisabled" size="mini" placeholder="单位" />
<el-select :disabled="isView || scope.row.isDisabled" v-model="scope.row.value7" size="mini" <el-select :disabled="isView || scope.row.isDisabled" v-model="scope.row.value7" size="mini"
clearable placeholder="符号"> clearable placeholder="符号">
<el-option v-for="(item, i) in rightSymbols" :key="i" :value="item.name"></el-option> <el-option v-for="(item, i) in rightSymbols" :key="i" :value="item.name"></el-option>
</el-select> </el-select>
</div>
</div> </div>
</div> </div>
</div> </div>
</template> </div>
</template>
<template v-if="scope.row.type == 6">
<div class="box money-box"> <template v-if="scope.row.type == 6">
<div class="line"> <div class="box money-box">
<el-checkbox class="money-check" v-model="scope.row.check1" <div class="line">
:disabled="isView || scope.row.isDisabled">100</el-checkbox> <el-checkbox class="money-check" v-model="scope.row.check1"
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val1" :disabled="isView || scope.row.isDisabled">100</el-checkbox>
:disabled="isView || scope.row.isDisabled" /> <el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val1"
</div> :disabled="isView || scope.row.isDisabled" />
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check2"
:disabled="isView || scope.row.isDisabled">50</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val2"
:disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check3"
:disabled="isView || scope.row.isDisabled">20</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val3"
:disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check4"
:disabled="isView || scope.row.isDisabled">10</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val4"
:disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check5"
:disabled="isView || scope.row.isDisabled">5</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val5"
:disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check6"
:disabled="isView || scope.row.isDisabled">1</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val6"
:disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check7"
:disabled="isView || scope.row.isDisabled">5</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val7"
:disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check8"
:disabled="isView || scope.row.isDisabled">1</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val8"
:disabled="isView || scope.row.isDisabled" />
</div>
</div> </div>
</template> <div class="line">
</div> <el-checkbox class="money-check" v-model="scope.row.check2"
</template> :disabled="isView || scope.row.isDisabled">50</el-checkbox>
</el-table-column> <el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val2"
<el-table-column label="操作" width="300" v-if="!isView"> :disabled="isView || scope.row.isDisabled" />
<template slot-scope="scope" v-if="scope.row.isSubject"> </div>
<el-button v-show="scope.row.isDisabled" size="mini" type="text" @click="handleEdit(scope.row)">编辑 <div class="line">
</el-button> <el-checkbox class="money-check" v-model="scope.row.check3"
<el-button v-show="!scope.row.isDisabled" size="mini" type="text" @click="handleSave(scope.row)">保存 :disabled="isView || scope.row.isDisabled">20</el-checkbox>
</el-button> <el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val3"
<!-- <el-button v-show="!scope.row.isDisabled" :disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check4"
:disabled="isView || scope.row.isDisabled">10</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val4"
:disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check5"
:disabled="isView || scope.row.isDisabled">5</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val5"
:disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check6"
:disabled="isView || scope.row.isDisabled">1</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val6"
:disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check7"
:disabled="isView || scope.row.isDisabled">5</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val7"
:disabled="isView || scope.row.isDisabled" />
</div>
<div class="line">
<el-checkbox class="money-check" v-model="scope.row.check8"
:disabled="isView || scope.row.isDisabled">1</el-checkbox>
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val8"
:disabled="isView || scope.row.isDisabled" />
</div>
</div>
</template>
</div>
</template>
</el-table-column>
<el-table-column label="操作" width="300" v-if="!isView">
<template slot-scope="scope" v-if="scope.row.isSubject">
<el-button v-show="scope.row.isDisabled" size="mini" type="text" @click="handleEdit(scope.row)">编辑
</el-button>
<el-button v-show="!scope.row.isDisabled" size="mini" type="text" @click="handleSave(scope.row)">保存
</el-button>
<!-- <el-button v-show="!scope.row.isDisabled"
size="mini" size="mini"
type="text" type="text"
@click="handleCancel(scope.row, scope.$index)">取消 @click="handleCancel(scope.row, scope.$index)">取消
</el-button> --> </el-button> -->
<el-button v-show="scope.row.isDisabled" size="mini" type="text" <el-button v-show="scope.row.isDisabled" size="mini" type="text"
@click="handleDelete(scope.row, scope.$index)">删除 @click="handleDelete(scope.row, scope.$index)">删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card>
</div> </div>
</div> <el-backtop></el-backtop>
<el-backtop></el-backtop> </el-card>
</div> </div>
</template> </template>
<script> <script>
import quill from "@/components/quill"; import quill from "@/components/quill";
import MyTree from "@/components/myTree/src/tree"; import MyTree from "@/components/myTree/src/tree";
import { deepCopy } from "@/utils/deepCopy";
import { mapState } from 'vuex' import { mapState } from 'vuex'
import _ from 'lodash' import _ from 'lodash'
export default { export default {
@ -325,6 +313,14 @@ export default {
return { return {
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
isSt: this.$route.query.systemId == 19, isSt: this.$route.query.systemId == 19,
routes: [
{
name: '实验记录',
},
{
name: '实验情况'
},
],
count: 0, count: 0,
fromChange: -999, fromChange: -999,
fromCountIndex: -999, fromCountIndex: -999,
@ -777,7 +773,7 @@ export default {
}); });
return result; return result;
}, },
Back () { // back () { //
this.$router.back(); this.$router.back();
}, },
handleBlur () { // / handleBlur () { // /
@ -879,7 +875,7 @@ export default {
this.$post(this.api.addJudgmentPoint, this.formData).then(res => { this.$post(this.api.addJudgmentPoint, this.formData).then(res => {
if (res.status === 200) { if (res.status === 200) {
this.$message.success("新增判分点成功"); this.$message.success("新增判分点成功");
this.Back(); this.back();
} else { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
} }
@ -888,7 +884,7 @@ export default {
this.$post(this.api.updateJudgmentPoint, this.formData).then(res => { this.$post(this.api.updateJudgmentPoint, this.formData).then(res => {
if (res.status === 200) { if (res.status === 200) {
this.$message.success("更新判分点成功"); this.$message.success("更新判分点成功");
this.Back(); this.back();
} else { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
} }
@ -983,7 +979,6 @@ export default {
}, },
handleEdit (row) { // handleEdit (row) { //
this.judgePoints = true this.judgePoints = true
// this.tableDataCopy = deepCopy(this.tableData); //
row.isDisabled = false; row.isDisabled = false;
row.isSave = false; row.isSave = false;
}, },
@ -1145,43 +1140,15 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 20px;
} }
.content { .wrap {
position: relative; padding: 20px;
top: 10px;
padding: 0 10px;
background-color: #ffffff;
.header { .header {
border-bottom: 1px dashed #ccc;
height: 45px;
line-height: 45px;
font-size: 12px;
font-weight: 600;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.back {
line-height: 3;
span {
font-size: 16px;
font-weight: 600;
padding-left: 5px;
}
}
.title {
font-weight: bold;
font-size: 14px;
margin-left: 20px;
}
}
.cell div {
margin: auto;
text-align: center;
} }
.business { .business {
@ -1195,22 +1162,6 @@ export default {
// //
.form-con { .form-con {
padding-bottom: 24px;
border-bottom: 1px dashed #ccc;
.title {
padding: 10px 0;
border-bottom: 1px dashed #ccc;
display: flex;
.black {
width: 8px;
height: 18px;
background-color: #333;
margin-right: 10px;
}
}
.item { .item {
display: flex; display: flex;
margin-top: 24px; margin-top: 24px;
@ -1227,29 +1178,6 @@ export default {
} }
} }
} }
//
.rule-con {
padding-bottom: 60px;
.title-con {
height: 60px;
display: flex;
justify-content: space-between;
align-items: center;
.title {
display: flex;
.black {
width: 8px;
height: 18px;
background-color: #333;
margin-right: 10px;
}
}
}
}
} }
/deep/.add-tree { /deep/.add-tree {
@ -1260,26 +1188,6 @@ export default {
} }
} }
//
/deep/ ::-webkit-scrollbar {
width: 6px; //
height: 6px; //
}
//
/deep/ ::-webkit-scrollbar-thumb {
background-color: #9278ff;
border-radius: 3px;
-webkit-box-shadow: inset 0 0 5px #dddddd;
}
/deep/ ::-webkit-scrollbar-track {
/*滚动条里面轨道*/
-webkit-box-shadow: inset 0 0 5px #dddddd;
border-radius: 0;
background: #dddddd;
}
.tree-con { .tree-con {
height: 230px; height: 230px;
position: relative; position: relative;

Loading…
Cancel
Save