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": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"commondir": {
"version": "1.0.1",
@ -4240,6 +4239,11 @@
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
"dev": true
},
"cssfilter": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz",
"integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw=="
},
"cssnano": {
"version": "4.1.10",
"resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz",
@ -7115,6 +7119,14 @@
"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": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
@ -12317,6 +12329,15 @@
"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": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",

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

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

@ -11,7 +11,7 @@ if(isKd){
host = 'http://124.71.12.62:9000'; // 巢湖版
} else if (dev) {
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';
@ -22,6 +22,11 @@ export default {
// 交易类(流程类)
getAllBusiness: `${host}/judgment/judgment/lcRecord/getAllBusiness`, // 获取流程记录列表(树)
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获取题目信息
addJudgmentRule: `${host}/judgment/judgment/lcJudgmentRule/addJudgmentRule`, // 添加判分点规则
updateJudgmentRule: `${host}/judgment/judgment/lcJudgmentRule/updateJudgmentRule`, // 添加判分点规则

@ -1,7 +1,9 @@
<template>
<div class="content">
<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>
</i>
@ -9,59 +11,80 @@
</div>
<div class="footer">
<div class="footer_h">
<div class="black" style="float: left"></div>
<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>
<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 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>
</div>
</div>
<div>
<el-row>
<el-col :span="24">
<el-card shadow="hover">
<el-table
:data="tableData"
<el-table :data="tableData"
:cell-style="rowClass"
:header-cell-style="headClass"
:stripe="true"
header-align="center"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55">
</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>
</el-table-column>
<el-table-column prop="name" label="判分点名称" align="center"></el-table-column>
<el-table-column label="实验要求" align="center">
<el-table-column prop="name"
label="判分点名称"
align="center"></el-table-column>
<el-table-column label="实验要求"
align="center">
<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" />
</template>
</el-table-column>
<el-table-column prop="operate" label="操作" align="center">
<el-table-column prop="operate"
label="操作"
align="center">
<template slot-scope="scope">
<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-button @click="handleEdit(scope.row)"
type="text"
size="small">编辑</el-button>
<el-button @click="handleDelete(scope.row)"
type="text"
size="small">删除</el-button>
</template>
</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">
<el-switch
v-model="scope.row.isOpen"
<el-switch v-model="scope.row.isOpen"
:active-value="0"
:inactive-value="1"
@change="changeSwitch(scope.row)"
></el-switch>
@change="changeSwitch(scope.row)"></el-switch>
</template>
</el-table-column>
</el-table>
@ -71,14 +94,12 @@
<!-- 分页 -->
<div class="block">
<el-pagination
background
<el-pagination background
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-size="10"
layout="total,prev, pager, next, jumper"
:total="dataTotal"
></el-pagination>
:total="dataTotal"></el-pagination>
</div>
</div>
</div>
@ -118,7 +139,7 @@ export default {
console.log('当前地址=', location.host);
console.log("token=", this.$route.query.token)
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)
this.$route.query.token && this.$store.commit('setParam', {
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 {
font-size: 16px;
margin-right: 30px;
@ -481,8 +502,8 @@ export default {
outline: 0;
}
.header /deep/ [class*=" el-icon-"],
[class^="el-icon-"] {
.header /deep/ [class*=' el-icon-'],
[class^='el-icon-'] {
line-height: 3;
padding-left: 10px;
}

@ -3,13 +3,18 @@
<div class="content">
<div class="header">
<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>
</i>
<span class="title">判分点设置</span>
</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>
@ -22,18 +27,22 @@
</div>
<div class="item">
<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="请输入内容"
clearable
style="width: 400px"
></el-input>
style="width: 400px"></el-input>
</div>
<div class="item">
<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>
@ -45,7 +54,13 @@
</div>
<p style="text-align: center;">参考答案</p>
<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>
@ -57,75 +72,98 @@
<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="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="addRule">新增</el-button>
</div>
</div>
<el-card shadow="hover">
<el-table
class="lc-table"
<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"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55">
</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">
{{ 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">
<el-table-column label="编译器中正确答案"
align="center">
<template slot-scope="scope"
v-if="scope.row.isSubject">
<p class="p">字段一致性规则用户编辑器中至少出现如下语句</p>
<el-input
type="textarea"
<el-input type="textarea"
:rows="3"
v-model="scope.row.required"
:disabled="isView || scope.row.isDisabled"
></el-input>
:disabled="isView || scope.row.isDisabled"></el-input>
</template>
</el-table-column>
<el-table-column label=" " width="150">
<el-table-column label=" "
width="150">
<template slot-scope="scope">
<el-button
circle
<el-button circle
type="primary"
v-if="scope.row.isSubject"
:disabled="isView || scope.row.isDisabled"
@click="changeResult(scope.row)"
style="position: absolute; right: 55px"
>
style="position: absolute; right: 55px">
{{ scope.row.resultOperation === 0 ? '且' : '或' }}
</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 ? "且" : "或" }}
</el-button>
</template>
</el-table-column>
<el-table-column label="终端中正确答案" align="center">
<template slot-scope="scope" v-if="scope.row.isSubject">
<el-table-column label="终端中正确答案"
align="center">
<template slot-scope="scope"
v-if="scope.row.isSubject">
<p class="p">运行结果一致性规则用户运行结果需要与下方代码运行结果一致</p>
<el-input
type="textarea"
<el-input type="textarea"
:rows="3"
v-model="scope.row.result"
:disabled="isView || scope.row.isDisabled"
></el-input>
: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>
<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>
@ -156,7 +194,9 @@ export default {
isDel: 0,
isOpen: 0,
projectId: "",
systemId: ""
systemId: "",
experimentCodeType: '0',
experimentalRequirementsType: '0',
},
bcJudgmentRuleList: []
}, //
@ -166,10 +206,6 @@ export default {
};
},
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', {
token: atob(decodeURI(this.$route.query.token)),
referrer: atob(decodeURI(this.$route.query.referrer))
@ -190,6 +226,8 @@ export default {
this.$get(`${this.api.queryBcJudgmentPointByBcId}?bcId=${bcId}`).then(res => {
if (res.status === 200) {
let { judgmentPoint, judgmentRule } = res;
if (!judgmentPoint.experimentCodeType) judgmentPoint.experimentCodeType = '0'
if (!judgmentPoint.experimentalRequirementsType) judgmentPoint.experimentalRequirementsType = '0'
this.formData = {
points: judgmentPoint,
bcJudgmentRuleList: judgmentRule
@ -567,7 +605,6 @@ export default {
}
}
}
}
}

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

Loading…
Cancel
Save