yujialong 1 year ago
parent 123a722bbe
commit 838abe42b8
  1. 25
      package-lock.json
  2. 1
      package.json
  3. 99
      src/components/quill/index.vue
  4. 7
      src/utils/api.js
  5. 83
      src/views/Home.vue
  6. 131
      src/views/Program.vue
  7. 489
      src/views/Transaction.vue

25
package-lock.json generated

@ -3696,8 +3696,7 @@
"commander": { "commander": {
"version": "2.20.3", "version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
"dev": true
}, },
"commondir": { "commondir": {
"version": "1.0.1", "version": "1.0.1",
@ -4240,6 +4239,11 @@
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
"dev": true "dev": true
}, },
"cssfilter": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz",
"integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw=="
},
"cssnano": { "cssnano": {
"version": "4.1.10", "version": "4.1.10",
"resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz", "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz",
@ -7115,6 +7119,14 @@
"object-visit": "^1.0.0" "object-visit": "^1.0.0"
} }
}, },
"mavon-editor": {
"version": "2.10.4",
"resolved": "https://registry.npmjs.org/mavon-editor/-/mavon-editor-2.10.4.tgz",
"integrity": "sha512-CFsBLkgt/KZBDg+SJYe2fyYv4zClY149PiwpH0rDAiiP4ae1XNs0GC8nBsoTeipsHcebDLN1QMkt3bUsnMDjQw==",
"requires": {
"xss": "^1.0.6"
}
},
"md5.js": { "md5.js": {
"version": "1.3.5", "version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
@ -12317,6 +12329,15 @@
"async-limiter": "~1.0.0" "async-limiter": "~1.0.0"
} }
}, },
"xss": {
"version": "1.0.14",
"resolved": "https://registry.npmjs.org/xss/-/xss-1.0.14.tgz",
"integrity": "sha512-og7TEJhXvn1a7kzZGQ7ETjdQVS2UfZyTlsEdDOqvQF7GoxNfY+0YLCzBy1kPdsDDx4QuNAonQPddpsn6Xl/7sw==",
"requires": {
"commander": "^2.20.3",
"cssfilter": "0.0.10"
}
},
"xtend": { "xtend": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",

@ -12,6 +12,7 @@
"core-js": "^3.6.5", "core-js": "^3.6.5",
"element-ui": "^2.14.0", "element-ui": "^2.14.0",
"lib-flexible": "^0.3.2", "lib-flexible": "^0.3.2",
"mavon-editor": "^2.10.4",
"postcss-px2rem": "^0.3.0", "postcss-px2rem": "^0.3.0",
"postcss-pxtorem": "^5.1.1", "postcss-pxtorem": "^5.1.1",
"px2rem-loader": "^0.1.9", "px2rem-loader": "^0.1.9",

@ -1,11 +1,39 @@
<template> <template>
<div class="quill" :class="[classes,readonly ? 'readonly' : '']"> <div>
<div :ref="toref" :style="styles" v-loading="loading"></div> <el-radio-group v-if="!readonly"
class="type-radio"
v-model="editorType"
@change="typeChange">
<el-radio label="0">富文本</el-radio>
<el-radio label="1">markdown</el-radio>
</el-radio-group>
<div v-show="editorType == 0"
class="quill"
:class="[classes,readonly ? 'readonly' : '']">
<div :ref="toref"
:style="styles"
v-loading="loading"></div>
<el-upload :headers="headers" :action="this.api.fileupload" :before-upload="beforeUpload" :on-success="editorUploadSuccess" style="display: none"> <el-upload :headers="headers"
<el-button :id="'editorUpload' + index" ref="editorUpload" size="small" type="primary">点击上传</el-button> :action="this.api.fileupload"
:before-upload="beforeUpload"
:on-success="editorUploadSuccess"
style="display: none">
<el-button :id="'editorUpload' + index"
ref="editorUpload"
size="small"
type="primary">点击上传</el-button>
</el-upload> </el-upload>
</div> </div>
<mavon-editor class="md"
v-model="mdVal"
v-show="editorType == 1"
ref="md"
:ishljs="true"
:subfield="false"
@change="mdChange"
@imgAdd="imgAdd" />
</div>
</template> </template>
<script> <script>
@ -14,9 +42,15 @@
import 'quill/dist/quill.snow.css'; import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css'; import 'quill/dist/quill.bubble.css';
import toolbarOptions from './options' import toolbarOptions from './options'
import axios from 'axios'
import { mavonEditor } from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
export default { export default {
name: 'quill', name: 'quill',
components: {
mavonEditor
},
props: { props: {
toref: { toref: {
type: String, type: String,
@ -49,6 +83,11 @@
type: Number, type: Number,
default: 0 default: 0
}, },
//
type: {
type: String,
default: '0'
},
}, },
data () { data () {
let that = this let that = this
@ -56,6 +95,8 @@
headers: { headers: {
token: this.$store.state.token token: this.$store.state.token
}, },
editorType: '0',
mdVal: '',
Quill: null, Quill: null,
currentValue: '', currentValue: '',
options: { options: {
@ -104,20 +145,28 @@
} }
}, },
watch: { watch: {
type: {
handler (val) {
this.editorType = val
},
immediate: true
},
value: { value: {
handler (val) { handler (val) {
if (this.type == 0) {
if (val !== this.currentValue) { if (val !== this.currentValue) {
this.currentValue = val; this.currentValue = val;
if (this.Quill) { if (this.Quill) {
this.Quill.pasteHTML(this.value); this.Quill.pasteHTML(this.value);
} }
} }
}
if (!this.mdVal) this.mdVal = val
}, },
immediate: true immediate: true
} }
}, },
mounted () { mounted () {
// console.log(this.$refs.editorUpload.$el)
this.init(); this.init();
}, },
beforeDestroy () { beforeDestroy () {
@ -125,6 +174,11 @@
this.Quill = null; this.Quill = null;
}, },
methods: { methods: {
//
typeChange (val) {
this.$emit('update:type', val)
if (!this.mdVal) this.mdVal = this.value
},
init () { init () {
let toeval = "this.$refs." + this.toref let toeval = "this.$refs." + this.toref
const editor = eval(toeval) const editor = eval(toeval)
@ -191,6 +245,7 @@
beforeUpload (file) { beforeUpload (file) {
this.loading = true this.loading = true
}, },
// quill
editorUploadSuccess (res) { editorUploadSuccess (res) {
// //
let quill = this.Quill; let quill = this.Quill;
@ -206,11 +261,37 @@
util.successMsg("图片插入失败"); util.successMsg("图片插入失败");
} }
this.loading = false; this.loading = false;
} },
//
mdChange (val) {
this.$emit('input', val)
},
// markdown
imgAdd (pos, $file) {
let $vm = this.$refs.md
// ..
const formData = new FormData();
formData.append('file', $file);
axios({
url: this.api.fileupload,
method: 'post',
data: formData,
headers: {
token: this.$store.state.token,
'Content-Type': 'multipart/form-data'
},
}).then((res) => {
$vm.$img2Url(pos, res.data.data.filesResult.fileUrl);
})
},
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.type-radio {
margin-bottom: 20px;
}
.quill-no-border { .quill-no-border {
.ql-toolbar.ql-snow { .ql-toolbar.ql-snow {
border: none; border: none;
@ -220,4 +301,10 @@
border: none; border: none;
} }
} }
.md {
max-height: 300px;
}
/deep/.v-note-wrapper .v-note-panel {
min-height: 200px;
}
</style> </style>

@ -11,7 +11,7 @@ if(isKd){
host = 'http://124.71.12.62:9000'; // 巢湖版 host = 'http://124.71.12.62:9000'; // 巢湖版
} else if (dev) { } else if (dev) {
host = 'http://121.37.12.51'; //线上 host = 'http://121.37.12.51'; //线上
// host = 'http://192.168.31.137:9000'; //赓 // host = 'http://192.168.31.217:9000';
} }
} }
let host1 = 'http://121.37.12.51:8080'; let host1 = 'http://121.37.12.51:8080';
@ -22,6 +22,11 @@ export default {
// 交易类(流程类) // 交易类(流程类)
getAllBusiness: `${host}/judgment/judgment/lcRecord/getAllBusiness`, // 获取流程记录列表(树) getAllBusiness: `${host}/judgment/judgment/lcRecord/getAllBusiness`, // 获取流程记录列表(树)
getProcess: `${host}/judgment/judgment/lcRecord/getProcess`, // 获取流程记录列表(树) getProcess: `${host}/judgment/judgment/lcRecord/getProcess`, // 获取流程记录列表(树)
// getAllBusinessSt: `${host}/nakadai/nakadai/customsPass/checkpointList`, // 获取流程记录列表(树)
getProcessSt: `${host}/judgment/judgment/stRecord/getProcess`, // 获取流程记录列表(树)
getAllBusinessSt: `${host}/judgment/judgment/stRecord/getAllBusiness`, // 获取流程记录列表(树)
getSubjectInfoSt: `${host}/judgment/stSubject/getSubjectInfo`, // 根据题目id获取题目信息
queryJudgmentPointDetailsSt: `${host}/judgment/judgment/lcJudgmentPoint/queryJudgmentPointDetailsBySt`, // 获取判分点详细信息
getSubjectInfo: `${host}/judgment/judgment/lcSubject/getSubjectInfo`, // 根据题目id获取题目信息 getSubjectInfo: `${host}/judgment/judgment/lcSubject/getSubjectInfo`, // 根据题目id获取题目信息
addJudgmentRule: `${host}/judgment/judgment/lcJudgmentRule/addJudgmentRule`, // 添加判分点规则 addJudgmentRule: `${host}/judgment/judgment/lcJudgmentRule/addJudgmentRule`, // 添加判分点规则
updateJudgmentRule: `${host}/judgment/judgment/lcJudgmentRule/updateJudgmentRule`, // 添加判分点规则 updateJudgmentRule: `${host}/judgment/judgment/lcJudgmentRule/updateJudgmentRule`, // 添加判分点规则

@ -1,7 +1,9 @@
<template> <template>
<div class="content"> <div class="content">
<div class="header flex"> <div class="header flex">
<i class="el-icon-arrow-left" @click="BackMain()" style="cursor:pointer"> <i class="el-icon-arrow-left"
@click="BackMain()"
style="cursor:pointer">
<span>Back</span> <span>Back</span>
</i> </i>
@ -9,59 +11,80 @@
</div> </div>
<div class="footer"> <div class="footer">
<div class="footer_h"> <div class="footer_h">
<div class="black" style="float: left"></div> <div class="black"
style="float: left"></div>
<p style="float: left">判分点列表</p> <p style="float: left">判分点列表</p>
</div> </div>
<div class="flex footer_h"> <div class="flex footer_h">
<div style="width: 300px;float: left"> <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> <el-input placeholder="请输入判分点名称"
style="height: 33px;width:100%"
prefix-icon="el-icon-search"
v-model="keyword"
clearable></el-input>
</div> </div>
<div style="float: right"> <div style="float: right">
<el-button class="button" style="height: 33px;line-height: 0px" @click="HomepageJump()">新增</el-button> <el-button class="button"
<el-button class="button" style="height: 33px;line-height: 0px" @click="deletes()">批量删除</el-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>
</div> </div>
</div> </div>
<div> <div>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover"> <el-card shadow="hover">
<el-table <el-table :data="tableData"
:data="tableData"
:cell-style="rowClass" :cell-style="rowClass"
:header-cell-style="headClass" :header-cell-style="headClass"
:stripe="true" :stripe="true"
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange">
> <el-table-column type="selection"
<el-table-column
type="selection"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column type="index" label="序号" align="center"> <el-table-column type="index"
label="序号"
align="center">
<template slot-scope="scope">{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</template> <template slot-scope="scope">{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="判分点名称" align="center"></el-table-column> <el-table-column prop="name"
<el-table-column label="实验要求" align="center"> label="判分点名称"
align="center"></el-table-column>
<el-table-column label="实验要求"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<quill :border="true" :readonly="true" v-model="scope.row.experimentalRequirements" :minHeight="150" <quill :border="true"
:readonly="true"
v-model="scope.row.experimentalRequirements"
:minHeight="150"
:height="150" /> :height="150" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="operate" label="操作" align="center"> <el-table-column prop="operate"
label="操作"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleEdit(scope.row)" type="text" size="small">编辑</el-button> <el-button @click="handleEdit(scope.row)"
<el-button @click="handleDelete(scope.row)" type="text" size="small">删除</el-button> type="text"
size="small">编辑</el-button>
<el-button @click="handleDelete(scope.row)"
type="text"
size="small">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="isOpen" label="是否启用" align="center" min-width="20%"> <el-table-column prop="isOpen"
label="是否启用"
align="center"
min-width="20%">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch v-model="scope.row.isOpen"
v-model="scope.row.isOpen"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"
@change="changeSwitch(scope.row)" @change="changeSwitch(scope.row)"></el-switch>
></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -71,14 +94,12 @@
<!-- 分页 --> <!-- 分页 -->
<div class="block"> <div class="block">
<el-pagination <el-pagination background
background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="pageNum" :current-page="pageNum"
:page-size="10" :page-size="10"
layout="total,prev, pager, next, jumper" layout="total,prev, pager, next, jumper"
:total="dataTotal" :total="dataTotal"></el-pagination>
></el-pagination>
</div> </div>
</div> </div>
</div> </div>
@ -118,7 +139,7 @@ export default {
console.log('当前地址=', location.host); console.log('当前地址=', location.host);
console.log("token=", this.$route.query.token) console.log("token=", this.$route.query.token)
console.log("systemId=", this.$route.query.systemId) console.log("systemId=", this.$route.query.systemId)
this.isProcess = this.systemId == 11 || this.systemId == 12 this.isProcess = this.systemId == 11 || this.systemId == 12 || this.systemId == 19
// sessionStorage.setItem('token',this.$route.query.token) // sessionStorage.setItem('token',this.$route.query.token)
this.$route.query.token && this.$store.commit('setParam', { this.$route.query.token && this.$store.commit('setParam', {
token: atob(decodeURI(this.$route.query.token)), token: atob(decodeURI(this.$route.query.token)),
@ -352,7 +373,7 @@ export default {
} }
// //
.footer /deep/ .el-pagination span:not([class*="suffix"]), .footer /deep/ .el-pagination span:not([class*='suffix']),
.el-pagination button { .el-pagination button {
font-size: 16px; font-size: 16px;
margin-right: 30px; margin-right: 30px;
@ -481,8 +502,8 @@ export default {
outline: 0; outline: 0;
} }
.header /deep/ [class*=" el-icon-"], .header /deep/ [class*=' el-icon-'],
[class^="el-icon-"] { [class^='el-icon-'] {
line-height: 3; line-height: 3;
padding-left: 10px; padding-left: 10px;
} }

@ -3,13 +3,18 @@
<div class="content"> <div class="content">
<div class="header"> <div class="header">
<div> <div>
<i class="back el-icon-arrow-left" @click="Back()" style="cursor:pointer"> <i class="back el-icon-arrow-left"
@click="Back()"
style="cursor:pointer">
<span>Back</span> <span>Back</span>
</i> </i>
<span class="title">判分点设置</span> <span class="title">判分点设置</span>
</div> </div>
<div> <div>
<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>
</div> </div>
</div> </div>
@ -22,18 +27,22 @@
</div> </div>
<div class="item"> <div class="item">
<div class="label">判分点</div> <div class="label">判分点</div>
<el-input <el-input v-model.trim="formData.points.name"
v-model.trim="formData.points.name"
:readonly="isView" :readonly="isView"
@blur="handleBlur" @blur="handleBlur"
placeholder="请输入内容" placeholder="请输入内容"
clearable clearable
style="width: 400px" style="width: 400px"></el-input>
></el-input>
</div> </div>
<div class="item"> <div class="item">
<div class="label">实验要求</div> <div class="label">实验要求</div>
<quill class="quill" v-model="formData.points.experimentalRequirements" :readonly="isView" :border="true" :minHeight="150" :height="150"/> <quill class="quill"
v-model="formData.points.experimentalRequirements"
:type.sync="formData.points.experimentalRequirementsType"
:readonly="isView"
:border="true"
:minHeight="150"
:height="150" />
</div> </div>
</div> </div>
@ -45,7 +54,13 @@
</div> </div>
<p style="text-align: center;">参考答案</p> <p style="text-align: center;">参考答案</p>
<div> <div>
<quill v-model="formData.points.experimentCode" :readonly="isView" :border="true" :minHeight="300" :height="300" :index="1"/> <quill v-model="formData.points.experimentCode"
:type.sync="formData.points.experimentCodeType"
:readonly="isView"
:border="true"
:minHeight="300"
:height="300"
:index="1" />
</div> </div>
</div> </div>
@ -57,75 +72,98 @@
<div>判分规则</div> <div>判分规则</div>
</div> </div>
<div> <div>
<el-button v-if="!isView" type="primary" size="mini" @click="batchDel">批量删除</el-button> <el-button v-if="!isView"
<el-button v-if="!isView" type="primary" size="mini" @click="addRule">新增</el-button> type="primary"
size="mini"
@click="batchDel">批量删除</el-button>
<el-button v-if="!isView"
type="primary"
size="mini"
@click="addRule">新增</el-button>
</div> </div>
</div> </div>
<el-card shadow="hover"> <el-card shadow="hover">
<el-table <el-table class="lc-table"
class="lc-table"
:data="tableData" :data="tableData"
:stripe="true" :stripe="true"
:cell-style="rowClass" :cell-style="rowClass"
header-align="center" header-align="center"
:header-cell-style="headClass" :header-cell-style="headClass"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange">
> <el-table-column type="selection"
<el-table-column
type="selection"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column prop="id" type="index" label="序号" width="80"> <el-table-column prop="id"
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="编译器中正确答案" align="center"> <el-table-column label="编译器中正确答案"
<template slot-scope="scope" v-if="scope.row.isSubject"> align="center">
<template slot-scope="scope"
v-if="scope.row.isSubject">
<p class="p">字段一致性规则用户编辑器中至少出现如下语句</p> <p class="p">字段一致性规则用户编辑器中至少出现如下语句</p>
<el-input <el-input type="textarea"
type="textarea"
:rows="3" :rows="3"
v-model="scope.row.required" v-model="scope.row.required"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"></el-input>
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label=" " width="150"> <el-table-column label=" "
width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button circle
circle
type="primary" type="primary"
v-if="scope.row.isSubject" v-if="scope.row.isSubject"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"
@click="changeResult(scope.row)" @click="changeResult(scope.row)"
style="position: absolute; right: 55px" style="position: absolute; right: 55px">
>
{{ scope.row.resultOperation === 0 ? '且' : '或' }} {{ scope.row.resultOperation === 0 ? '且' : '或' }}
</el-button> </el-button>
<el-button v-else type="primary" circle @click="changeRule(scope.row, scope.$index)"> <el-button v-else
type="primary"
circle
@click="changeRule(scope.row, scope.$index)">
{{ scope.row.ruleOperation === 0 ? "且" : "或" }} {{ scope.row.ruleOperation === 0 ? "且" : "或" }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="终端中正确答案" align="center"> <el-table-column label="终端中正确答案"
<template slot-scope="scope" v-if="scope.row.isSubject"> align="center">
<template slot-scope="scope"
v-if="scope.row.isSubject">
<p class="p">运行结果一致性规则用户运行结果需要与下方代码运行结果一致</p> <p class="p">运行结果一致性规则用户运行结果需要与下方代码运行结果一致</p>
<el-input <el-input type="textarea"
type="textarea"
:rows="3" :rows="3"
v-model="scope.row.result" v-model="scope.row.result"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"></el-input>
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="300" v-if="!isView"> <el-table-column label="操作"
<template slot-scope="scope" v-if="scope.row.isSubject"> width="300"
<el-button v-show="scope.row.isDisabled" size="mini" type="text" @click="handleEdit(scope.row)">编辑</el-button> v-if="!isView">
<el-button v-show="!scope.row.isDisabled" size="mini" type="text" @click="handleSave(scope.row)">保存</el-button> <template slot-scope="scope"
<el-button v-show="!scope.row.isDisabled" size="mini" type="text" @click="handleCancel(scope.row, scope.$index)">取消</el-button> v-if="scope.row.isSubject">
<el-button v-show="scope.row.isDisabled" size="mini" type="text" @click="handleDelete(scope.$index)">删除</el-button> <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -156,7 +194,9 @@ export default {
isDel: 0, isDel: 0,
isOpen: 0, isOpen: 0,
projectId: "", projectId: "",
systemId: "" systemId: "",
experimentCodeType: '0',
experimentalRequirementsType: '0',
}, },
bcJudgmentRuleList: [] bcJudgmentRuleList: []
}, // }, //
@ -166,10 +206,6 @@ export default {
}; };
}, },
mounted () { mounted () {
console.log('当前地址=', location.host);
console.log("token=", this.$route.query.token)
console.log("systemId=", this.$route.query.systemId)
this.$route.query.token && this.$store.commit('setParam', { this.$route.query.token && this.$store.commit('setParam', {
token: atob(decodeURI(this.$route.query.token)), token: atob(decodeURI(this.$route.query.token)),
referrer: atob(decodeURI(this.$route.query.referrer)) referrer: atob(decodeURI(this.$route.query.referrer))
@ -190,6 +226,8 @@ export default {
this.$get(`${this.api.queryBcJudgmentPointByBcId}?bcId=${bcId}`).then(res => { this.$get(`${this.api.queryBcJudgmentPointByBcId}?bcId=${bcId}`).then(res => {
if (res.status === 200) { if (res.status === 200) {
let { judgmentPoint, judgmentRule } = res; let { judgmentPoint, judgmentRule } = res;
if (!judgmentPoint.experimentCodeType) judgmentPoint.experimentCodeType = '0'
if (!judgmentPoint.experimentalRequirementsType) judgmentPoint.experimentalRequirementsType = '0'
this.formData = { this.formData = {
points: judgmentPoint, points: judgmentPoint,
bcJudgmentRuleList: judgmentRule bcJudgmentRuleList: judgmentRule
@ -567,7 +605,6 @@ export default {
} }
} }
} }
} }
} }

@ -1,17 +1,23 @@
<template> <template>
<!-- 交易类 --> <!-- 交易类 -->
<div class="content" v-loading="loading" <div class="content"
v-loading="loading"
element-loading-text="加载中" element-loading-text="加载中"
element-loading-spinner="el-icon-loading"> element-loading-spinner="el-icon-loading">
<div class="header"> <div class="header">
<div> <div>
<i class="back el-icon-arrow-left" @click="Back()" style="cursor:pointer"> <i class="back el-icon-arrow-left"
@click="Back()"
style="cursor:pointer">
<span>Back</span> <span>Back</span>
</i> </i>
<span class="title">判分点设置</span> <span class="title">判分点设置</span>
</div> </div>
<div> <div>
<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>
</div> </div>
</div> </div>
@ -23,25 +29,21 @@
</div> </div>
<div class="item"> <div class="item">
<div class="label">判分点</div> <div class="label">判分点</div>
<el-input <el-input v-model.trim="formData.lcJudgmentPoint.name"
v-model.trim="formData.lcJudgmentPoint.name"
:readonly="isView" :readonly="isView"
@blur="handleBlur" @blur="handleBlur"
placeholder="请输入内容" placeholder="请输入内容"
clearable clearable
style="width: 400px" style="width: 400px"></el-input>
></el-input>
</div> </div>
<div class="item"> <div class="item">
<div class="label">实验要求</div> <div class="label">实验要求</div>
<quill <quill class="quill"
class="quill"
v-model="formData.lcJudgmentPoint.experimentalRequirements" v-model="formData.lcJudgmentPoint.experimentalRequirements"
:readonly="isView" :readonly="isView"
:border="true" :border="true"
:minHeight="150" :minHeight="150"
:height="150" :height="150" />
/>
</div> </div>
</div> </div>
@ -52,11 +54,14 @@
<div>判分规则</div> <div>判分规则</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">
<el-tree <!-- <el-tree class="add-tree"
class="add-tree"
style="background: #F5F5F5" style="background: #F5F5F5"
:data="treeData" :data="treeData"
@check="currentChecked" @check="currentChecked"
@ -66,85 +71,112 @@
node-key="operationIds" node-key="operationIds"
:props="defaultProps" :props="defaultProps"
v-if="configVisible"> v-if="configVisible">
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node"
slot-scope="{ node, data }">
<span>{{ node.label }}</span> <span>{{ node.label }}</span>
<em class="exist" v-if="data.exist">已导入</em> <em class="exist"
v-if="data.exist">已导入</em>
</span> </span>
</el-tree> </el-tree> -->
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer"
class="dialog-footer">
<el-button @click="configVisible = false"> </el-button> <el-button @click="configVisible = false"> </el-button>
<el-button type="primary" @click="handleConfirm"> </el-button> <el-button type="primary"
@click="handleConfirm"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-card shadow="hover" style="margin-bottom: 20px"> <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">业务</div> <div class="label">{{isSt ? '关卡' : '业务'}}</div>
<el-select v-model="formData.lcJudgmentPoint.business" placeholder="请选择业务"> <el-select v-model="formData.lcJudgmentPoint.business"
<el-option v-for="(item, i) in businessList" :key="i" :label="item.name" :value="item.id"></el-option> placeholder="请选择业务">
<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"
<el-button v-if="!isView" type="primary" size="mini" @click="addRules">新增</el-button> type="primary"
size="mini"
@click="batchDel">批量删除</el-button>
<el-button v-if="!isView"
type="primary"
size="mini"
@click="addRules">新增</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover"> <el-card shadow="hover">
<el-table <el-table class="lc-table"
class="lc-table"
:data="tableData" :data="tableData"
:stripe="true" :stripe="true"
:key="itemkey" :key="itemkey"
row-key="i"
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange">
> <el-table-column type="selection"
<el-table-column
type="selection"
width="55"> 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"
<el-tree :data="scope.row.operationIData" :props="defaultProp" :default-expand-all="true"></el-tree> :id="'divTree'+scope.$index">
<el-tree :data="scope.row.operationIData"
:props="defaultProp"
:default-expand-all="true"></el-tree>
</div> </div>
<div v-show="scope.row.isDisabled" class="mask"></div> <div v-show="scope.row.isDisabled"
class="mask"></div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label=" " width="150" align="center"> <el-table-column label=" "
width="150"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button circle
circle
type="primary" type="primary"
v-if="scope.row.isSubject" v-if="scope.row.isSubject"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"
@click="changeResult(scope.row)" @click="changeResult(scope.row)">
>
{{ scope.row.resultOperation === 0 ? "且" : "或" }} {{ scope.row.resultOperation === 0 ? "且" : "或" }}
</el-button> </el-button>
<el-button v-else type="primary" circle @click="changeRule(scope.row, scope.$index)"> <el-button v-else
type="primary"
circle
@click="changeRule(scope.row, scope.$index)">
{{ scope.row.ruleOperation === 0 ? "且" : "或" }} {{ scope.row.ruleOperation === 0 ? "且" : "或" }}
</el-button> </el-button>
</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"
<p class="p" style="margin-top: 1px">交易结果一致性规则用户交易结果需要与下面设置的交易结果指标要求一致</p> v-if="scope.row.isSubject">
<p class="p"
style="margin-top: 1px">交易结果一致性规则用户交易结果需要与下面设置的交易结果指标要求一致</p>
<div class="block"> <div class="block">
<!-- type: 题目类型(1选择 2判断 3填空 4问答 5指标结果) --> <!-- type: 题目类型(1选择 2判断 3填空 4问答 5指标结果) -->
<div v-if="scope.row.operationIds && scope.row.type == null" style="line-height: 65px;text-align: center">需点击</div> <div v-if="scope.row.operationIds && scope.row.type == null"
style="line-height: 65px;text-align: center">需点击</div>
<template v-if="scope.row.type == 1"> <template v-if="scope.row.type == 1">
<div class="box"> <div class="box">
<div class="line"> <div class="line">
@ -154,18 +186,15 @@
<span class="label mini">正确答案</span> <span class="label mini">正确答案</span>
<div class="action"> <div class="action">
<!--multiple:多选--> <!--multiple:多选-->
<el-select <el-select v-model="scope.row.value1"
v-model="scope.row.value1"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"
size="mini" size="mini"
style="width: 100%" :multiple="isSt"
> style="width: 100%">
<el-option <el-option v-for="(item, index) in isSt ? scope.row.stItems : scope.row.lcItems"
v-for="(item, index) in scope.row.lcItems"
:key="item.itemId" :key="item.itemId"
:label="item.options" :label="item.options"
:value="item.itemId" :value="item.itemId"></el-option>
></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -180,18 +209,14 @@
<div class="line"> <div class="line">
<span class="label mini">正确答案</span> <span class="label mini">正确答案</span>
<div class="action"> <div class="action">
<el-select <el-select v-model="scope.row.value1"
v-model="scope.row.value1"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"
size="mini" size="mini"
style="width: 100%" style="width: 100%">
> <el-option v-for="(item, index) in scope.row.lcItems"
<el-option
v-for="(item, index) in scope.row.lcItems"
:key="item.subjectId" :key="item.subjectId"
:label="item.options" :label="item.options"
:value="item.subjectId" :value="item.subjectId"></el-option>
></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -200,21 +225,20 @@
<template v-if="scope.row.type == 3"> <template v-if="scope.row.type == 3">
<div class="box"> <div class="box">
<div class="line" style="min-height: 100%;"> <div class="line"
style="min-height: 100%;">
<span class="label"> <span class="label">
<!--<el-checkbox v-model="scope.row.fieldOfReq" :disabled="isView || scope.row.isDisabled">字段要求</el-checkbox>--> <!--<el-checkbox v-model="scope.row.fieldOfReq" :disabled="isView || scope.row.isDisabled">字段要求</el-checkbox>-->
字段要求 字段要求
</span> </span>
<div class="action"> <div class="action">
<el-input <el-input class="mini-textarea"
class="mini-textarea"
type="textarea" type="textarea"
rows="6" rows="6"
size="mini" size="mini"
v-model.trim="scope.row.value1" v-model.trim="scope.row.value1"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"
placeholder="字段之间以逗号隔开" placeholder="字段之间以逗号隔开"></el-input>
></el-input>
</div> </div>
</div> </div>
</div> </div>
@ -228,20 +252,23 @@
字数要求 字数要求
</span> </span>
<div class="action a-line"> <div class="action a-line">
<el-select <el-select v-model="scope.row.value1"
v-model="scope.row.value1"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"
size="mini" size="mini">
> <el-option label=">"
<el-option label=">" value=">"></el-option> value=">"></el-option>
<el-option label="<" value="<"></el-option> <el-option label="<"
<el-option label="=" value="="></el-option> value="<"></el-option>
<el-option label=">=" value=">="></el-option> <el-option label="="
<el-option label="<=" value="<="></el-option> 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-select>
<el-input <el-input class="number-input"
class="number-input"
v-model.trim="scope.row.value2" v-model.trim="scope.row.value2"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"
onkeyup="value=this.value.replace(/\D+/g,'')" onkeyup="value=this.value.replace(/\D+/g,'')"
@ -249,8 +276,7 @@
type="number" type="number"
min="1" min="1"
size="mini" size="mini"
style="margin-left: 5px;" style="margin-left: 5px;"></el-input>
></el-input>
</div> </div>
</div> </div>
<div class="line"> <div class="line">
@ -259,15 +285,13 @@
字段要求 字段要求
</span> </span>
<div class="action"> <div class="action">
<el-input <el-input class="mini-textarea"
class="mini-textarea"
type="textarea" type="textarea"
rows="5" rows="5"
size="mini" size="mini"
v-model.trim="scope.row.value3" v-model.trim="scope.row.value3"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"
placeholder="字段之间以逗号隔开" placeholder="字段之间以逗号隔开"></el-input>
></el-input>
</div> </div>
</div> </div>
</div> </div>
@ -300,35 +324,31 @@
<span class="label">交易指标区间</span> <span class="label">交易指标区间</span>
<div class="action"> <div class="action">
<div class="inputs"> <div class="inputs">
<el-select <el-select v-model="scope.row.value2"
v-model="scope.row.value2"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"
size="mini" size="mini"
> clearable>
<el-option label="(" value="("></el-option> <el-option v-for="item in leftSymbols"
<el-option label="[" value="["></el-option> :key="item"
:value="item.name"></el-option>
</el-select> </el-select>
<el-input <el-input class="number-input"
class="number-input"
v-model.trim="scope.row.value3" v-model.trim="scope.row.value3"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"
type="number" type="number"
size="mini" size="mini"></el-input>
></el-input> <el-input class="number-input"
<el-input
class="number-input"
v-model.trim="scope.row.value4" v-model.trim="scope.row.value4"
:disabled="isView || scope.row.isDisabled" :disabled="isView || scope.row.isDisabled"
type="number" type="number"
size="mini" size="mini"></el-input>
></el-input> <el-select :disabled="isView || scope.row.isDisabled"
<el-select
:disabled="isView || scope.row.isDisabled"
v-model="scope.row.value5" v-model="scope.row.value5"
size="mini" size="mini"
> clearable>
<el-option label=")" value=")"></el-option> <el-option v-for="item in rightSymbols"
<el-option label="]" value="]"></el-option> :key="item"
:value="item.name"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -339,53 +359,121 @@
<template v-if="scope.row.type == 6"> <template v-if="scope.row.type == 6">
<div class="box money-box"> <div class="box money-box">
<div class="line"> <div class="line">
<el-checkbox class="money-check" v-model="scope.row.check1" :disabled="isView || scope.row.isDisabled">100元</el-checkbox> <el-checkbox class="money-check"
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val1" :disabled="isView || scope.row.isDisabled" /> v-model="scope.row.check1"
:disabled="isView || scope.row.isDisabled">100</el-checkbox>
<el-input class="money"
placeholder="请输入数量"
type="number"
size="mini"
v-model="scope.row.val1"
:disabled="isView || scope.row.isDisabled" />
</div> </div>
<div class="line"> <div class="line">
<el-checkbox class="money-check" v-model="scope.row.check2" :disabled="isView || scope.row.isDisabled">50元</el-checkbox> <el-checkbox class="money-check"
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val2" :disabled="isView || scope.row.isDisabled" /> 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>
<div class="line"> <div class="line">
<el-checkbox class="money-check" v-model="scope.row.check3" :disabled="isView || scope.row.isDisabled">20元</el-checkbox> <el-checkbox class="money-check"
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val3" :disabled="isView || scope.row.isDisabled" /> 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>
<div class="line"> <div class="line">
<el-checkbox class="money-check" v-model="scope.row.check4" :disabled="isView || scope.row.isDisabled">10元</el-checkbox> <el-checkbox class="money-check"
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val4" :disabled="isView || scope.row.isDisabled" /> 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>
<div class="line"> <div class="line">
<el-checkbox class="money-check" v-model="scope.row.check5" :disabled="isView || scope.row.isDisabled">5元</el-checkbox> <el-checkbox class="money-check"
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val5" :disabled="isView || scope.row.isDisabled" /> 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>
<div class="line"> <div class="line">
<el-checkbox class="money-check" v-model="scope.row.check6" :disabled="isView || scope.row.isDisabled">1元</el-checkbox> <el-checkbox class="money-check"
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val6" :disabled="isView || scope.row.isDisabled" /> 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>
<div class="line"> <div class="line">
<el-checkbox class="money-check" v-model="scope.row.check7" :disabled="isView || scope.row.isDisabled">5角</el-checkbox> <el-checkbox class="money-check"
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val7" :disabled="isView || scope.row.isDisabled" /> 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>
<div class="line"> <div class="line">
<el-checkbox class="money-check" v-model="scope.row.check8" :disabled="isView || scope.row.isDisabled">1角</el-checkbox> <el-checkbox class="money-check"
<el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val8" :disabled="isView || scope.row.isDisabled" /> 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> </div>
</template> </template>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="300" v-if="!isView"> <el-table-column label="操作"
<template slot-scope="scope" v-if="scope.row.isSubject"> width="300"
<el-button v-show="scope.row.isDisabled" size="mini" type="text" @click="handleEdit(scope.row)">编辑 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>
<el-button v-show="!scope.row.isDisabled" size="mini" type="text" <el-button v-show="!scope.row.isDisabled"
size="mini"
type="text"
@click="handleSave(scope.row, scope.$index)">保存 @click="handleSave(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="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>
@ -408,6 +496,7 @@ export default {
data () { data () {
return { return {
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
isSt: this.$route.query.systemId == 19,
count: 0, count: 0,
fromChange: -999, fromChange: -999,
fromCountIndex: -999, fromCountIndex: -999,
@ -442,6 +531,22 @@ export default {
}, },
lcJudgmentRuleList: [] lcJudgmentRuleList: []
}, // }, //
leftSymbols: [
{
name: '('
},
{
name: '['
},
],
rightSymbols: [
{
name: ')'
},
{
name: ']'
},
],
tableData: [], // tableData: [], //
tableDataCopy: [], // tableDataCopy: [], //
isAddRule: false, // isAddRule: false, //
@ -463,6 +568,42 @@ export default {
this.$route.query.token && this.$store.commit("setParam", { this.$route.query.token && this.$store.commit("setParam", {
token: atob(decodeURI(this.$route.query.token)) token: atob(decodeURI(this.$route.query.token))
}); });
if (this.isSt) {
this.leftSymbols = [
{
name: '>='
},
{
name: '<'
},
{
name: '>'
},
{
name: '=='
},
{
name: '<='
},
]
this.rightSymbols = [
{
name: '>='
},
{
name: '<'
},
{
name: '>'
},
{
name: '=='
},
{
name: '<='
},
]
}
this.getBusiness() this.getBusiness()
this.checkChange.push(false) this.checkChange.push(false)
this.getTreeData(); this.getTreeData();
@ -473,7 +614,7 @@ export default {
methods: { methods: {
getInfoData (lcId) { // getInfoData (lcId) { //
this.counts = 0 this.counts = 0
this.$get(`${this.api.queryJudgmentPointDetails}?lcId=${lcId}`).then(res => { this.$get(`${this.api[this.isSt ? 'queryJudgmentPointDetailsSt' : 'queryJudgmentPointDetails']}?lcId=${lcId}`).then(res => {
if (res.status === 200) { if (res.status === 200) {
let { judgmentPoint, judgmentRuleList } = res; let { judgmentPoint, judgmentRuleList } = res;
this.formData = { this.formData = {
@ -483,6 +624,7 @@ export default {
this.$set(this.formData.lcJudgmentPoint, 'business', +judgmentRuleList[0].operationIds.split(',')[1]) // idoperationIdsid285 this.$set(this.formData.lcJudgmentPoint, 'business', +judgmentRuleList[0].operationIds.split(',')[1]) // idoperationIdsid285
this.anewPosttingData(judgmentRuleList) this.anewPosttingData(judgmentRuleList)
this.tableData.forEach(async (item, index) => { this.tableData.forEach(async (item, index) => {
item.i = index
// //
let lists = JSON.parse(JSON.stringify(this.treeData)) let lists = JSON.parse(JSON.stringify(this.treeData))
if (item.operationIds) { if (item.operationIds) {
@ -503,6 +645,7 @@ export default {
// await this.getSubjectData(item.emptyOne, index); // await this.getSubjectData(item.emptyOne, index);
} }
}); });
console.log("🚀 ~ file: Transaction.vue:646 ~ this.tableData.forEach ~ this.tableData:", this.tableData)
this.setIndex() this.setIndex()
this.loading = false this.loading = false
} else { } else {
@ -516,14 +659,25 @@ export default {
}, },
// //
getBusiness () { getBusiness () {
this.$post(`${this.api.getAllBusiness}?systemId=${this.systemId}`).then(({ lcRecords }) => { // if (this.isSt) {
this.businessList = lcRecords // this.$post(this.api.getAllBusinessSt, {
// platformId: 3,
// }).then(({ data }) => {
// this.businessList = data
// }).catch(res => { })
// } else {
// this.$post(`${this.api.getAllBusiness}?systemId=${this.systemId}`).then(({ stRecords, lcRecords }) => {
// this.businessList = this.isSt ? stRecords : lcRecords
// }).catch(res => { })
// }
this.$post(`${this.api[this.isSt ? 'getAllBusinessSt' : 'getAllBusiness']}?systemId=${this.systemId}`).then(({ stRecords, lcRecords }) => {
this.businessList = this.isSt ? stRecords : lcRecords
}).catch(res => { }) }).catch(res => { })
}, },
handleSelectionChange (val) { handleSelectionChange (val) {
this.multipleSelection = val this.multipleSelection = val
}, },
filterRule(id, obj, needObj) { filterRule (id, obj = [], needObj) {
let first = id.shift() let first = id.shift()
let tmp = obj.find(item => item.id == first) let tmp = obj.find(item => item.id == first)
needObj.children = obj.filter(item => item.id == first) needObj.children = obj.filter(item => item.id == first)
@ -541,7 +695,7 @@ export default {
let list = [] let list = []
if (this.SelectedObj.checkedNodes.length > 0) { if (this.SelectedObj.checkedNodes.length > 0) {
for (let i = 0; i < this.SelectedObj.checkedNodes.length; i++) { for (let i = 0; i < this.SelectedObj.checkedNodes.length; i++) {
if(this.SelectedObj.checkedNodes[i].children.length > 0){ if (this.SelectedObj.checkedNodes[i].children && this.SelectedObj.checkedNodes[i].children.length > 0) {
} else { } else {
this.SelectedObj.checkedNodes[i].resultOperation = 0 this.SelectedObj.checkedNodes[i].resultOperation = 0
@ -576,7 +730,6 @@ export default {
this.configVisible = false this.configVisible = false
}, },
anewPosttingDatas (judgmentRuleList) { anewPosttingDatas (judgmentRuleList) {
console.log("🚀 ~ file: Transaction.vue ~ line 577 ~ anewPosttingDatas ~ judgmentRuleList", judgmentRuleList)
let length = judgmentRuleList.length; let length = judgmentRuleList.length;
let tempArr = []; let tempArr = [];
if (this.tableData.length > 0) { if (this.tableData.length > 0) {
@ -620,10 +773,17 @@ export default {
obj.value3 = item.emptyTwo; obj.value3 = item.emptyTwo;
} else if (item.type == 5) { } else if (item.type == 5) {
obj.subjectId = Number(item.emptyOne); obj.subjectId = Number(item.emptyOne);
obj.value2 = item.emptyTwo[0]; const temp = item.emptyTwo.split('~')
obj.value3 = item.emptyTwo.substring(1, item.emptyTwo.indexOf("~")); if (temp.length) {
obj.value4 = item.emptyTwo.substring(item.emptyTwo.indexOf("~") + 1, item.emptyTwo.length - 1); const symbol = temp[0].match(/[<>=]+/g)
obj.value5 = item.emptyTwo[item.emptyTwo.length - 1]; const num = temp[0].match(/[\d.]+/g)
const symbol1 = temp.length > 1 ? temp[1].match(/[<>=]+/g) : ''
const num1 = temp.length > 1 ? temp[1].match(/[\d.]+/g) : ''
obj.value2 = symbol ? symbol[0] : ''
obj.value3 = num ? num[0] : ''
obj.value4 = num1 ? num1[0] : ''
obj.value5 = symbol1 ? symbol1[0] : ''
}
} }
tempArr.push(obj); tempArr.push(obj);
if (length > 1 && index !== (length - 1)) { if (length > 1 && index !== (length - 1)) {
@ -634,7 +794,6 @@ export default {
} }
} }
}); });
console.log(444, tempArr)
for (var i = 0; i < tempArr.length; i++) { for (var i = 0; i < tempArr.length; i++) {
this.tableData.push(tempArr[i]); this.tableData.push(tempArr[i]);
} }
@ -657,7 +816,10 @@ export default {
obj.type = item.type obj.type = item.type
} }
//(1 2 3 4 5) //(1 2 3 4 5)
if (item.type == 1 || item.type == 2) { if (item.type == 1 && this.isSt) {
obj.subjectId = Number(item.emptyOne);
obj.value1 = item.emptyTwo.split(',').map(e => +e)
} else if (item.type == 1 || item.type == 2) {
obj.subjectId = Number(item.emptyOne); obj.subjectId = Number(item.emptyOne);
obj.value1 = +item.emptyTwo; obj.value1 = +item.emptyTwo;
} else if (item.type == 3) { } else if (item.type == 3) {
@ -675,10 +837,17 @@ export default {
obj.value3 = item.emptyTwo; obj.value3 = item.emptyTwo;
} else if (item.type == 5) { } else if (item.type == 5) {
obj.subjectId = Number(item.emptyOne); obj.subjectId = Number(item.emptyOne);
obj.value2 = item.emptyTwo[0]; const temp = item.emptyTwo.split('~')
obj.value3 = item.emptyTwo.substring(1, item.emptyTwo.indexOf("~")); if (temp.length) {
obj.value4 = item.emptyTwo.substring(item.emptyTwo.indexOf("~") + 1, item.emptyTwo.length - 1); const symbol = temp[0].match(/[<>=]+/g)
obj.value5 = item.emptyTwo[item.emptyTwo.length - 1]; const num = temp[0].match(/[\d.]+/g)
const symbol1 = temp.length > 1 ? temp[1].match(/[<>=]+/g) : ''
const num1 = temp.length > 1 ? temp[1].match(/[\d.]+/g) : ''
obj.value2 = symbol ? symbol[0] : ''
obj.value3 = num ? num[0] : ''
obj.value4 = num1 ? num1[0] : ''
obj.value5 = symbol1 ? symbol1[0] : ''
}
} else if (item.type == 6) { } else if (item.type == 6) {
obj.subjectId = Number(item.emptyOne); obj.subjectId = Number(item.emptyOne);
const money = item.emptyTwo.split(',') // const money = item.emptyTwo.split(',') //
@ -690,7 +859,6 @@ export default {
money.map(e => { money.map(e => {
const val = e.split('-') const val = e.split('-')
const i = moneys.findIndex(n => n == val[0]) const i = moneys.findIndex(n => n == val[0])
console.log(33, i)
obj['check' + (i + 1)] = true obj['check' + (i + 1)] = true
obj['val' + (i + 1)] = val[1] obj['val' + (i + 1)] = val[1]
}) })
@ -704,12 +872,13 @@ export default {
}, },
getSubjectData (subjectId, index) { // getSubjectData (subjectId, index) { //
if (subjectId) { if (subjectId) {
this.$get(`${this.api.getSubjectInfo}?subject_id=${subjectId}`).then(res => { this.$get(`${this.api[this.isSt ? 'getSubjectInfoSt' : 'getSubjectInfo']}?subject_id=${subjectId}`).then(res => {
if (res.status === 200) { if (res.status === 200) {
let item = { let item = {
...this.tableData[index], ...this.tableData[index],
...res.subject, ...res.subject,
lcItems: res.items lcItems: res.items,
stItems: res.items,
}; };
this.$set(this.tableData, index, item); this.$set(this.tableData, index, item);
} }
@ -756,10 +925,11 @@ export default {
// } // }
// this.loading = false // this.loading = false
// }else { // }else {
this.$post(`${this.api.getProcess}?systemId=${this.systemId}`).then(({ process, status, message }) => { this.$post(`${this.api[this.isSt ? 'getProcessSt' : 'getProcess']}?systemId=${this.systemId}`).then(({ process, status, message }) => {
if (status == 200) { if (status == 200) {
if (process.length) { if (process.length) {
this.$store.commit('setTreeDataStore', { treeDataStore: process }) this.$store.commit('setTreeDataStore', { treeDataStore: process })
console.log("🚀 ~ file: Transaction.vue:932 ~ this.$post ~ process:", process)
this.treeData = this.toTreeId(process); this.treeData = this.toTreeId(process);
this.loading = false this.loading = false
if (this.$route.query.lcId) { if (this.$route.query.lcId) {
@ -776,8 +946,10 @@ export default {
// } // }
}, },
toTreeId (data, parentId) { // id++,便key,id toTreeId (data, parentId) { // id++,便key,id
const name = this.isSt ? 'recordChildren' : 'children'
let result = []; let result = [];
data.forEach(item => { data.forEach(item => {
// console.log("🚀 ~ file: Transaction.vue:866 ~ toTreeId ~ name:", item[name])
item.label = item.name item.label = item.name
if (item.isNode === 0) { if (item.isNode === 0) {
item.showCheckbox = false; item.showCheckbox = false;
@ -785,7 +957,8 @@ export default {
item.showCheckbox = true; item.showCheckbox = true;
} }
item.operationIds = parentId ? `${parentId},${item.id}` : `${item.id}` item.operationIds = parentId ? `${parentId},${item.id}` : `${item.id}`
if (item.children && item.children.length) item.children = this.toTreeId(item.children, item.operationIds) if (this.isSt && item.recordChildren) item.children = item.recordChildren
if (item[name] && item[name].length) item[name] = this.toTreeId(item[name], item.operationIds)
result.push(item); result.push(item);
}); });
return result; return result;
@ -797,7 +970,8 @@ export default {
if (this.formData.lcJudgmentPoint.name) { if (this.formData.lcJudgmentPoint.name) {
let params = { let params = {
lcId: this.lcId, lcId: this.lcId,
name: this.formData.lcJudgmentPoint.name name: this.formData.lcJudgmentPoint.name,
systemId: this.systemId
}; };
this.$post(this.api.queryNameIsExist, params).then(res => { this.$post(this.api.queryNameIsExist, params).then(res => {
if (res.status === 200) { if (res.status === 200) {
@ -853,14 +1027,14 @@ export default {
lcId: i.lcId, lcId: i.lcId,
itemId: '', itemId: '',
type: i.type ? i.type : "", type: i.type ? i.type : "",
operationIds: `${this.systemId == 11 ? 285 : 591},${point.business},${i.operationIds}`, operationIds: `${this.systemId == 11 ? 285 : 1},${point.business},${i.operationIds}`,
resultOperation: i.resultOperation, resultOperation: i.resultOperation,
ruleOperation: i.ruleOperation ruleOperation: i.ruleOperation
}; };
//(1 2 3 4 5) //(1 2 3 4 5)
if (i.type == 1 || i.type == 2) { if (i.type == 1 || i.type == 2) {
obj.emptyOne = i.subjectId ? i.subjectId.toString() : ""; obj.emptyOne = i.subjectId ? i.subjectId.toString() : "";
obj.itemId = i.value1 ? i.value1.toString() : ""; // obj.itemId = i.value1 ? i.value1.toString() : "";
obj.emptyTwo = i.value1 ? i.value1.toString() : ""; obj.emptyTwo = i.value1 ? i.value1.toString() : "";
} else if (i.type == 3) { } else if (i.type == 3) {
obj.emptyOne = i.subjectId ? i.subjectId.toString() : ""; obj.emptyOne = i.subjectId ? i.subjectId.toString() : "";
@ -875,7 +1049,7 @@ export default {
} else if (i.type == 5) { } else if (i.type == 5) {
// obj.emptyOne = i.value1; // // obj.emptyOne = i.value1; //
obj.emptyOne = i.subjectId ? i.subjectId.toString() : ""; obj.emptyOne = i.subjectId ? i.subjectId.toString() : "";
obj.emptyTwo = `${i.value2}${i.value3}~${i.value4}${i.value5}`; obj.emptyTwo = `${i.value2 || ''}${i.value3}${i.value4 ? '~' + i.value4 : ''}${i.value5 || ''}`;
} else if (i.type == 6) { } else if (i.type == 6) {
const money = [] const money = []
const { moneys } = this const { moneys } = this
@ -1012,7 +1186,12 @@ export default {
} else { } else {
//(1 2 3 4 5) //(1 2 3 4 5)
if (row.type == 1 || row.type == 2) { if (row.type == 1 || row.type == 2) {
if (!row.value1) { if (row.type == 1 && this.isSt) {
if (!row.value1.length) {
this.$message.warning(`请选择正确答案`);
return;
}
} else if (!row.value1) {
this.$message.warning(`请选择正确答案`); this.$message.warning(`请选择正确答案`);
return; return;
} }
@ -1033,12 +1212,13 @@ export default {
return; return;
} }
} else if (row.type == 5) { } else if (row.type == 5) {
if (!row.value2 || !row.value5) { if ((!row.value2 || !row.value5) && !this.isSt) {
this.$message.warning(`请选择交易指标区间`); this.$message.warning(`请选择交易指标区间`);
return; return;
} else if (!row.value3 || !row.value4) { } else if ((!row.value3 || !row.value4) && !this.isSt) {
this.$message.warning(`请输入交易指标区间`); this.$message.warning(`请输入交易指标区间`);
} else if (row.value3 > row.value4) { return;
} else if (row.value3 && row.value4 && +row.value3 > +row.value4) {
this.$message.warning(`第一个指标必须小于第二个指标`); this.$message.warning(`第一个指标必须小于第二个指标`);
return; return;
} }
@ -1147,7 +1327,7 @@ export default {
</script> </script>
<style> <style>
.el-tree-node__content { .el-tree-node__content {
height: 26Px!important; height: 26px !important;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -1252,7 +1432,6 @@ export default {
} }
} }
} }
} }
} }
/deep/.add-tree { /deep/.add-tree {

Loading…
Cancel
Save