|
|
|
@ -2,11 +2,7 @@ |
|
|
|
|
<!-- 编程类 --> |
|
|
|
|
<div class="content"> |
|
|
|
|
<div class="header flex"> |
|
|
|
|
<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> |
|
|
|
|
|
|
|
|
@ -20,12 +16,7 @@ |
|
|
|
|
<p>基本信息</p> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-form |
|
|
|
|
:model="ruleForm" |
|
|
|
|
:rules="rules" |
|
|
|
|
ref="ruleForm" |
|
|
|
|
label-width="150px" |
|
|
|
|
> |
|
|
|
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px"> |
|
|
|
|
<el-form-item label="请输入判分点名称" prop="judgmentPointsName"> |
|
|
|
|
<el-input v-model="ruleForm.judgmentPointsName"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
@ -37,30 +28,17 @@ |
|
|
|
|
<div class="flex footer_b"> |
|
|
|
|
<div class="black"></div> |
|
|
|
|
<p>判分规则</p> |
|
|
|
|
<el-button class="btn" type="primary" :disabled="isAdd" @click="AddListRow()" |
|
|
|
|
>新增</el-button |
|
|
|
|
> |
|
|
|
|
<el-button class="btn" type="primary" :disabled="isAdd" @click="AddListRow()">新增</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="24"> |
|
|
|
|
<el-card shadow="hover"> |
|
|
|
|
<el-table |
|
|
|
|
:data="tableData" |
|
|
|
|
:stripe="true" |
|
|
|
|
:cell-style="rowClass" |
|
|
|
|
:header-cell-style="headClass" |
|
|
|
|
header-align="center" |
|
|
|
|
ref="editTable" |
|
|
|
|
> |
|
|
|
|
<el-table-column |
|
|
|
|
prop="decisionPointRule" |
|
|
|
|
type="index" |
|
|
|
|
label="序号" |
|
|
|
|
align="center" |
|
|
|
|
width="80" |
|
|
|
|
></el-table-column> |
|
|
|
|
<el-table :data="tableData" :stripe="true" :cell-style="rowClass" :header-cell-style="headClass" |
|
|
|
|
header-align="center" ref="editTable"> |
|
|
|
|
<el-table-column prop="decisionPointRule" type="index" label="序号" align="center" |
|
|
|
|
width="80"></el-table-column> |
|
|
|
|
<el-table-column label="流程判分正确答案" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<template v-if="scope.row.isInput"> |
|
|
|
@ -71,18 +49,10 @@ |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="label">一级栏目</span> |
|
|
|
|
<div class="action"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="scope.row.levelOne" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
size="mini" |
|
|
|
|
@change="getSubject(scope.row)" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="(item, index) in stepList" |
|
|
|
|
:key="index" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id" |
|
|
|
|
></el-option> |
|
|
|
|
<el-select v-model="scope.row.levelOne" placeholder="请选择" size="mini" |
|
|
|
|
@change="getSubject(scope.row)"> |
|
|
|
|
<el-option v-for="(item, index) in stepList" :key="index" :label="item.name" |
|
|
|
|
:value="item.id"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -90,18 +60,10 @@ |
|
|
|
|
<span class="label">子级栏目</span> |
|
|
|
|
<div class="action steps"> |
|
|
|
|
{{ scope.row.stepName }} |
|
|
|
|
<el-radio-group |
|
|
|
|
class="radio-wrap" |
|
|
|
|
v-model="scope.row.levelTwo" |
|
|
|
|
size="mini" |
|
|
|
|
@change="getOption(scope.row)" |
|
|
|
|
> |
|
|
|
|
<el-radio |
|
|
|
|
v-for="(item, index) in scope.row.subjectList" |
|
|
|
|
:key="index" |
|
|
|
|
:label="item.id" |
|
|
|
|
>{{ item.name }}</el-radio |
|
|
|
|
> |
|
|
|
|
<el-radio-group class="radio-wrap" v-model="scope.row.levelTwo" size="mini" |
|
|
|
|
@change="getOption(scope.row)"> |
|
|
|
|
<el-radio v-for="(item, index) in scope.row.subjectList" :key="index" :label="item.id">{{ |
|
|
|
|
item.name }}</el-radio> |
|
|
|
|
<!-- <div class="child"> |
|
|
|
|
<el-radio :label="9">备选项</el-radio> |
|
|
|
|
<el-radio :label="10">备选项</el-radio> |
|
|
|
@ -115,24 +77,12 @@ |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column align="center" width="150"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button |
|
|
|
|
v-if="scope.row.isInput" |
|
|
|
|
type="primary" |
|
|
|
|
:disabled="scope.row.isShow" |
|
|
|
|
style="cursor: pointer; border-radius: 50%" |
|
|
|
|
circle |
|
|
|
|
@click="getPerhaps(scope.row)" |
|
|
|
|
>{{ scope.row.operatorOne == 1 ? "且" : "或" }}</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
v-else |
|
|
|
|
type="primary" |
|
|
|
|
:disabled="scope.row.isShow" |
|
|
|
|
style="cursor: pointer; border-radius: 50%" |
|
|
|
|
circle |
|
|
|
|
@click="getPerhapsColumn(scope.row)" |
|
|
|
|
>{{ operatorTwo == 1 ? "且" : "或" }}</el-button |
|
|
|
|
> |
|
|
|
|
<el-button v-if="scope.row.isInput" type="primary" :disabled="scope.row.isShow" |
|
|
|
|
style="cursor: pointer; border-radius: 50%" circle @click="getPerhaps(scope.row)">{{ |
|
|
|
|
scope.row.operatorOne == 1 ? "且" : "或" }}</el-button> |
|
|
|
|
<el-button v-else type="primary" :disabled="scope.row.isShow" |
|
|
|
|
style="cursor: pointer; border-radius: 50%" circle @click="getPerhapsColumn(scope.row)">{{ |
|
|
|
|
operatorTwo == 1 ? "且" : "或" }}</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="交易结果正确答案" align="center"> |
|
|
|
@ -145,36 +95,28 @@ |
|
|
|
|
<template v-if="scope.row.levelTwo"> |
|
|
|
|
<template v-if="scope.row.type == 1 && scope.row.subjectName"> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="label" style="width: auto;text-align: left">{{scope.row.subjectName}}</span> |
|
|
|
|
<span class="label" style="width: auto;text-align: left">{{ scope.row.subjectName }}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="label mini">正确答案</span> |
|
|
|
|
<div class="action"> |
|
|
|
|
<el-select |
|
|
|
|
multiple |
|
|
|
|
v-model="scope.row.levelFour" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
size="mini" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="(item, index) in scope.row.optionList" |
|
|
|
|
:key="index" |
|
|
|
|
:label="item.childrenName" |
|
|
|
|
:value="item.cid" |
|
|
|
|
></el-option> |
|
|
|
|
<el-select multiple v-model="scope.row.levelFour" placeholder="请选择" size="mini" |
|
|
|
|
style="width: 100%"> |
|
|
|
|
<el-option v-for="(item, index) in scope.row.optionList" :key="index" |
|
|
|
|
:label="item.childrenName" :value="item.cid"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<template v-if="scope.row.type == 2"> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="label" style="width: auto;text-align: left">{{scope.row.subjectName}}</span> |
|
|
|
|
<span class="label" style="width: auto;text-align: left">{{ scope.row.subjectName }}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="label mini">正确答案</span> |
|
|
|
|
<div class="action" style="flex: none"> |
|
|
|
|
<el-date-picker v-model="scope.row.levelFour" type="date" placeholder="选择日期"></el-date-picker> |
|
|
|
|
<el-date-picker v-model="scope.row.levelFour" type="date" |
|
|
|
|
placeholder="选择日期"></el-date-picker> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -182,28 +124,14 @@ |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="label"> |
|
|
|
|
<el-checkbox v-model="scope.row.numOfWords">字数要求</el-checkbox> |
|
|
|
|
</span |
|
|
|
|
> |
|
|
|
|
</span> |
|
|
|
|
<div class="action a-line"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="scope.row.symbol" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
size="mini" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="(item, index) in symbolList" |
|
|
|
|
:key="index" |
|
|
|
|
:label="item.name" |
|
|
|
|
:value="item.id" |
|
|
|
|
></el-option> |
|
|
|
|
<el-select v-model="scope.row.symbol" placeholder="请选择" size="mini"> |
|
|
|
|
<el-option v-for="(item, index) in symbolList" :key="index" :label="item.name" |
|
|
|
|
:value="item.id"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-input |
|
|
|
|
type="number" |
|
|
|
|
min="0" |
|
|
|
|
style="margin-left: 5px" |
|
|
|
|
size="mini" |
|
|
|
|
v-model="scope.row.numDes" |
|
|
|
|
></el-input> |
|
|
|
|
<el-input type="number" min="0" style="margin-left: 5px" size="mini" |
|
|
|
|
v-model="scope.row.numDes"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="line"> |
|
|
|
@ -211,13 +139,8 @@ |
|
|
|
|
<el-checkbox v-model="scope.row.fieldOfReq">字段要求</el-checkbox> |
|
|
|
|
</span> |
|
|
|
|
<div class="action"> |
|
|
|
|
<el-input |
|
|
|
|
class="mini-textarea" |
|
|
|
|
type="textarea" |
|
|
|
|
cols="3" |
|
|
|
|
size="mini" |
|
|
|
|
v-model="scope.row.levelFour" |
|
|
|
|
></el-input> |
|
|
|
|
<el-input class="mini-textarea" type="textarea" cols="3" size="mini" |
|
|
|
|
v-model="scope.row.levelFour"></el-input> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -225,17 +148,9 @@ |
|
|
|
|
<div class="line"> |
|
|
|
|
<span class="label">选择指标</span> |
|
|
|
|
<div class="action"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="scope.row.levelThree" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
size="mini" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="(item, index) in scope.row.optionList" |
|
|
|
|
:key="index" |
|
|
|
|
:label="item.childrenName" |
|
|
|
|
:value="item.cid" |
|
|
|
|
></el-option> |
|
|
|
|
<el-select v-model="scope.row.levelThree" placeholder="请选择" size="mini"> |
|
|
|
|
<el-option v-for="(item, index) in scope.row.optionList" :key="index" |
|
|
|
|
:label="item.childrenName" :value="item.cid"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -243,29 +158,13 @@ |
|
|
|
|
<span class="label">交易指标区间</span> |
|
|
|
|
<div class="action"> |
|
|
|
|
<div class="inputs"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="scope.row.symbolInput1" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
size="mini" |
|
|
|
|
> |
|
|
|
|
<el-select v-model="scope.row.symbolInput1" placeholder="请选择" size="mini"> |
|
|
|
|
<el-option label="(" value="("></el-option> |
|
|
|
|
<el-option label="[" value="["></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-input |
|
|
|
|
type="number" |
|
|
|
|
v-model="scope.row.symbolInput2" |
|
|
|
|
size="mini" |
|
|
|
|
></el-input> |
|
|
|
|
<el-input |
|
|
|
|
type="number" |
|
|
|
|
v-model="scope.row.symbolInput3" |
|
|
|
|
size="mini" |
|
|
|
|
></el-input> |
|
|
|
|
<el-select |
|
|
|
|
v-model="scope.row.symbolInput4" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
size="mini" |
|
|
|
|
> |
|
|
|
|
<el-input type="number" v-model="scope.row.symbolInput2" size="mini"></el-input> |
|
|
|
|
<el-input type="number" v-model="scope.row.symbolInput3" size="mini"></el-input> |
|
|
|
|
<el-select v-model="scope.row.symbolInput4" placeholder="请选择" size="mini"> |
|
|
|
|
<el-option label=")" value=")"></el-option> |
|
|
|
|
<el-option label="]" value="]"></el-option> |
|
|
|
|
</el-select> |
|
|
|
@ -281,38 +180,14 @@ |
|
|
|
|
<el-table-column label="操作" align="center" width="300"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<template v-if="scope.row.isInput"> |
|
|
|
|
<el-link |
|
|
|
|
size="mini" |
|
|
|
|
type="primary" |
|
|
|
|
:underline="false" |
|
|
|
|
v-show="scope.row.isShow" |
|
|
|
|
@click="getHandleEdit(scope.row)" |
|
|
|
|
>编辑</el-link |
|
|
|
|
> |
|
|
|
|
<el-link |
|
|
|
|
type="primary" |
|
|
|
|
size="mini" |
|
|
|
|
:underline="false" |
|
|
|
|
v-show="!scope.row.isShow" |
|
|
|
|
@click="getRule(scope.row)" |
|
|
|
|
>保存</el-link |
|
|
|
|
> |
|
|
|
|
<el-link |
|
|
|
|
size="mini" |
|
|
|
|
type="primary" |
|
|
|
|
:underline="false" |
|
|
|
|
v-show="!scope.row.isShow && !scope.row.id" |
|
|
|
|
@click="dialogFormVisible(scope.$index, scope.row)" |
|
|
|
|
>取消</el-link |
|
|
|
|
> |
|
|
|
|
<el-link |
|
|
|
|
size="mini" |
|
|
|
|
type="primary" |
|
|
|
|
:underline="false" |
|
|
|
|
v-show="!scope.row.isShow" |
|
|
|
|
@click="getRuleDelete(scope.$index, scope.row)" |
|
|
|
|
>删除</el-link |
|
|
|
|
> |
|
|
|
|
<el-link size="mini" type="primary" :underline="false" v-show="scope.row.isShow" |
|
|
|
|
@click="getHandleEdit(scope.row)">编辑</el-link> |
|
|
|
|
<el-link type="primary" size="mini" :underline="false" v-show="!scope.row.isShow" |
|
|
|
|
@click="getRule(scope.row)">保存</el-link> |
|
|
|
|
<el-link size="mini" type="primary" :underline="false" v-show="!scope.row.isShow && !scope.row.id" |
|
|
|
|
@click="dialogFormVisible(scope.$index, scope.row)">取消</el-link> |
|
|
|
|
<el-link size="mini" type="primary" :underline="false" v-show="!scope.row.isShow" |
|
|
|
|
@click="getRuleDelete(scope.$index, scope.row)">删除</el-link> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
@ -327,7 +202,7 @@ |
|
|
|
|
<script> |
|
|
|
|
import quill from '@/components/quill' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
ruleList: [], |
|
|
|
|
ruleForm: { |
|
|
|
@ -373,18 +248,18 @@ export default { |
|
|
|
|
operatorTwo: 1, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
components: {quill}, |
|
|
|
|
mounted() { |
|
|
|
|
components: { quill }, |
|
|
|
|
mounted () { |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getPerhaps(a) { |
|
|
|
|
getPerhaps (a) { |
|
|
|
|
a.operatorOne = a.operatorOne == 1 ? 2 : 1 |
|
|
|
|
}, |
|
|
|
|
getPerhapsColumn() { |
|
|
|
|
getPerhapsColumn () { |
|
|
|
|
this.operatorTwo = this.operatorTwo == 1 ? 2 : 1 |
|
|
|
|
}, |
|
|
|
|
getMesg() { |
|
|
|
|
getMesg () { |
|
|
|
|
if (this.id) { |
|
|
|
|
this.$get(this.api.queryDetailsTrading, { |
|
|
|
|
tradingJudgmentPointsId: this.id, |
|
|
|
@ -397,8 +272,8 @@ export default { |
|
|
|
|
let ruleList = [] |
|
|
|
|
let len = rules.length |
|
|
|
|
let result = [] |
|
|
|
|
rules.map((e,i) => { |
|
|
|
|
e.isInput= true |
|
|
|
|
rules.map((e, i) => { |
|
|
|
|
e.isInput = true |
|
|
|
|
e.isShow = false |
|
|
|
|
e.levelOne = Number(e.levelOne) |
|
|
|
|
e.levelTwo = Number(e.levelTwo) |
|
|
|
@ -425,60 +300,60 @@ export default { |
|
|
|
|
levelFour: e.levelFour |
|
|
|
|
}) |
|
|
|
|
this.getSubject(e) |
|
|
|
|
if(e.type == 1){ |
|
|
|
|
if (e.type == 1) { |
|
|
|
|
let levelFour = e.levelFour.split(',') |
|
|
|
|
levelFour = levelFour.map(n => Number(n)) |
|
|
|
|
this.$set(e,'levelFour',levelFour) |
|
|
|
|
}else if(e.type == 2){ |
|
|
|
|
this.$set(e, 'levelFour', levelFour) |
|
|
|
|
} else if (e.type == 2) { |
|
|
|
|
|
|
|
|
|
}else if(e.type == 3){ |
|
|
|
|
if(e.levelThree === ''){ |
|
|
|
|
} else if (e.type == 3) { |
|
|
|
|
if (e.levelThree === '') { |
|
|
|
|
e.numOfWords = false |
|
|
|
|
}else{ |
|
|
|
|
e.symbol = this.symbolList.find(n => n.name == e.levelThree.replace(/,\d+/g,'')).id |
|
|
|
|
e.numDes = e.levelThree.replace(/\D+/g,'') |
|
|
|
|
} else { |
|
|
|
|
e.symbol = this.symbolList.find(n => n.name == e.levelThree.replace(/,\d+/g, '')).id |
|
|
|
|
e.numDes = e.levelThree.replace(/\D+/g, '') |
|
|
|
|
} |
|
|
|
|
if(e.levelFour === '') e.fieldOfReq = false |
|
|
|
|
}else if(e.type == 4){ |
|
|
|
|
if (e.levelFour === '') e.fieldOfReq = false |
|
|
|
|
} else if (e.type == 4) { |
|
|
|
|
e.levelThree = Number(e.levelThree) |
|
|
|
|
let levelFour = e.levelFour |
|
|
|
|
e.symbolInput1 = levelFour[0] |
|
|
|
|
e.symbolInput2 = levelFour.substring(1,levelFour.indexOf('~')) |
|
|
|
|
e.symbolInput3 = levelFour.substring(levelFour.indexOf('~') + 1,levelFour.length - 1) |
|
|
|
|
e.symbolInput2 = levelFour.substring(1, levelFour.indexOf('~')) |
|
|
|
|
e.symbolInput3 = levelFour.substring(levelFour.indexOf('~') + 1, levelFour.length - 1) |
|
|
|
|
e.symbolInput4 = levelFour[levelFour.length - 1] |
|
|
|
|
} |
|
|
|
|
result.push(e) |
|
|
|
|
if(len > 1 && i != len - 1) result.push({}) |
|
|
|
|
if (len > 1 && i != len - 1) result.push({}) |
|
|
|
|
}) |
|
|
|
|
this.operatorTwo = rules[0].operatorTwo |
|
|
|
|
this.ruleList = ruleList |
|
|
|
|
this.tableData = result |
|
|
|
|
}).catch((err) => {}) |
|
|
|
|
}).catch((err) => { }) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getData() { |
|
|
|
|
getData () { |
|
|
|
|
this.$get(this.api.firstLevel) |
|
|
|
|
.then((res) => { |
|
|
|
|
this.stepList = res.list |
|
|
|
|
this.getMesg() |
|
|
|
|
}).catch((err) => {}) |
|
|
|
|
}).catch((err) => { }) |
|
|
|
|
}, |
|
|
|
|
getSubject(row) { |
|
|
|
|
getSubject (row) { |
|
|
|
|
row.name = this.stepList.find((n) => n.id == row.levelOne).name |
|
|
|
|
this.$get(`${this.api.secondaryLevel}?id=${row.levelOne}`) |
|
|
|
|
.then((res) => { |
|
|
|
|
row.subjectList = res.list |
|
|
|
|
row.isFirst || (row.levelTwo = '') |
|
|
|
|
row.isFirst && row.id && this.getOption(row) |
|
|
|
|
}).catch((err) => {}) |
|
|
|
|
}).catch((err) => { }) |
|
|
|
|
}, |
|
|
|
|
getOption(row) { |
|
|
|
|
getOption (row) { |
|
|
|
|
row.subjectName = row.subjectList.find((n) => n.id == row.levelTwo).name |
|
|
|
|
this.$get(`${this.api.thirdLevel}?id=${row.levelTwo}`) |
|
|
|
|
.then((res) => { |
|
|
|
|
row.optionList = res.list |
|
|
|
|
row.type = row.optionList[0].type |
|
|
|
|
if(!row.isFirst){ |
|
|
|
|
if (!row.isFirst) { |
|
|
|
|
row.levelThree = '' |
|
|
|
|
row.levelFour = '' |
|
|
|
|
row.symbolInput1 = '' |
|
|
|
@ -492,10 +367,10 @@ export default { |
|
|
|
|
row.reqDes = '' |
|
|
|
|
} |
|
|
|
|
row.isFirst = false |
|
|
|
|
console.log(11,row) |
|
|
|
|
}).catch((err) => {}) |
|
|
|
|
console.log(11, row) |
|
|
|
|
}).catch((err) => { }) |
|
|
|
|
}, |
|
|
|
|
Savejump(formName) { |
|
|
|
|
Savejump (formName) { |
|
|
|
|
if (this.ruleList.length && this.tableData.length) { |
|
|
|
|
this.$refs[formName].validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
@ -511,7 +386,7 @@ export default { |
|
|
|
|
this.$post(this.api.updateTrading, data) |
|
|
|
|
.then((res) => { |
|
|
|
|
this.$router.back() |
|
|
|
|
}).catch((err) => {}) |
|
|
|
|
}).catch((err) => { }) |
|
|
|
|
} else { |
|
|
|
|
let data = { |
|
|
|
|
tradingJudgmentPoints: { |
|
|
|
@ -526,7 +401,7 @@ export default { |
|
|
|
|
this.$post(this.api.addTrading, data) |
|
|
|
|
.then((res) => { |
|
|
|
|
this.$router.back() |
|
|
|
|
}).catch((err) => {}) |
|
|
|
|
}).catch((err) => { }) |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return false; |
|
|
|
@ -537,7 +412,7 @@ export default { |
|
|
|
|
this.$message.error("错了哦,判分规则不能为空") |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getCookie(cookie_name) { |
|
|
|
|
getCookie (cookie_name) { |
|
|
|
|
//获取cookie中指定key的value |
|
|
|
|
var allcookies = document.cookie; //索引长度,开始索引的位置 |
|
|
|
|
var cookie_pos = allcookies.indexOf(cookie_name); // 如果找到了索引,就代表cookie存在,否则不存在 |
|
|
|
@ -555,51 +430,51 @@ export default { |
|
|
|
|
} |
|
|
|
|
return value; |
|
|
|
|
}, |
|
|
|
|
Back() { |
|
|
|
|
Back () { |
|
|
|
|
this.$router.back(); |
|
|
|
|
}, |
|
|
|
|
headClass() { |
|
|
|
|
headClass () { |
|
|
|
|
return "text-align: center;"; |
|
|
|
|
}, |
|
|
|
|
rowClass() { |
|
|
|
|
rowClass () { |
|
|
|
|
return "text-align: center;"; |
|
|
|
|
}, |
|
|
|
|
getRule(row) { |
|
|
|
|
if(!row.levelOne) return this.$message.warning('一级栏目不能为空') |
|
|
|
|
if(!row.levelTwo) return this.$message.warning('子级栏目不能为空') |
|
|
|
|
if(!row.levelFour.length && row.type == 1){ |
|
|
|
|
getRule (row) { |
|
|
|
|
if (!row.levelOne) return this.$message.warning('一级栏目不能为空') |
|
|
|
|
if (!row.levelTwo) return this.$message.warning('子级栏目不能为空') |
|
|
|
|
if (!row.levelFour.length && row.type == 1) { |
|
|
|
|
return this.$message.warning(`正确答案不能为空`) |
|
|
|
|
} |
|
|
|
|
if(!row.levelThree && row.type == 4){ |
|
|
|
|
if (!row.levelThree && row.type == 4) { |
|
|
|
|
return this.$message.warning(`选择指标不能为空`) |
|
|
|
|
} |
|
|
|
|
if(row.type == 3){ |
|
|
|
|
if(row.numOfWords && (!row.symbol || !row.numDes)) return this.$message.warning(`字数要求不能为空`) |
|
|
|
|
if(row.fieldOfReq && !row.fieldOfReq) return this.$message.warning(`字段要求不能为空`) |
|
|
|
|
if (row.type == 3) { |
|
|
|
|
if (row.numOfWords && (!row.symbol || !row.numDes)) return this.$message.warning(`字数要求不能为空`) |
|
|
|
|
if (row.fieldOfReq && !row.fieldOfReq) return this.$message.warning(`字段要求不能为空`) |
|
|
|
|
} |
|
|
|
|
if(row.type == 4 && (!row.symbolInput1 || !row.symbolInput2 || !row.symbolInput3 || !row.symbolInput4)) return this.$message.warning('交易指标区间不能为空') |
|
|
|
|
if (row.type == 4 && (!row.symbolInput1 || !row.symbolInput2 || !row.symbolInput3 || !row.symbolInput4)) return this.$message.warning('交易指标区间不能为空') |
|
|
|
|
|
|
|
|
|
let levelThree = row.levelThree |
|
|
|
|
if(row.type != 1) levelThree = levelThree + '' |
|
|
|
|
if (row.type != 1) levelThree = levelThree + '' |
|
|
|
|
let levelFour = row.levelFour |
|
|
|
|
if(row.type == 1){ |
|
|
|
|
if (row.type == 1) { |
|
|
|
|
levelThree = row.levelTwo |
|
|
|
|
levelFour = levelFour.join(',') |
|
|
|
|
}else if(row.type == 2){ |
|
|
|
|
} else if (row.type == 2) { |
|
|
|
|
let date = new Date(levelFour) |
|
|
|
|
levelFour = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() |
|
|
|
|
levelThree = row.levelTwo |
|
|
|
|
}else if(row.type == 3){ |
|
|
|
|
if(row.numOfWords){ |
|
|
|
|
if(row.numDes < 0) return this.$message.warning(`字数要求必须大于0`) |
|
|
|
|
} else if (row.type == 3) { |
|
|
|
|
if (row.numOfWords) { |
|
|
|
|
if (row.numDes < 0) return this.$message.warning(`字数要求必须大于0`) |
|
|
|
|
levelThree = this.symbolList.find((n) => n.id == row.symbol).name + ',' + row.numDes |
|
|
|
|
if(row.symbol == 6) levelThree = '无限制' |
|
|
|
|
}else{ |
|
|
|
|
if (row.symbol == 6) levelThree = '无限制' |
|
|
|
|
} else { |
|
|
|
|
levelThree = '' |
|
|
|
|
} |
|
|
|
|
levelFour = row.fieldOfReq ? row.levelFour : '' |
|
|
|
|
}else if(row.type == 4){ |
|
|
|
|
if(row.symbolInput2 >= row.symbolInput3) return this.$message.warning(`第一个指标必须小于第二个指标`) |
|
|
|
|
} else if (row.type == 4) { |
|
|
|
|
if (row.symbolInput2 >= row.symbolInput3) return this.$message.warning(`第一个指标必须小于第二个指标`) |
|
|
|
|
levelFour = row.symbolInput1 + row.symbolInput2 + '~' + row.symbolInput3 + row.symbolInput4 |
|
|
|
|
} |
|
|
|
|
let data = { |
|
|
|
@ -613,12 +488,12 @@ export default { |
|
|
|
|
} |
|
|
|
|
if (row.id) { |
|
|
|
|
data.id = row.id |
|
|
|
|
this.$post(this.api.updateRuleTrading,data) |
|
|
|
|
this.$post(this.api.updateRuleTrading, data) |
|
|
|
|
.then((res) => { |
|
|
|
|
this.isAdd = false |
|
|
|
|
row.isShow = true |
|
|
|
|
}).catch((err) => {}) |
|
|
|
|
}else{ |
|
|
|
|
}).catch((err) => { }) |
|
|
|
|
} else { |
|
|
|
|
this.ruleList.push({ |
|
|
|
|
operatorOne: row.operatorOne, |
|
|
|
|
operatorTwo: this.operatorTwo, |
|
|
|
@ -628,20 +503,20 @@ export default { |
|
|
|
|
levelThree, |
|
|
|
|
levelFour |
|
|
|
|
}) |
|
|
|
|
if(this.id){ |
|
|
|
|
if (this.id) { |
|
|
|
|
data.tradingJudgmentPointsId = this.id |
|
|
|
|
this.$post(this.api.addRule,data) |
|
|
|
|
this.$post(this.api.addRule, data) |
|
|
|
|
.then((res) => { |
|
|
|
|
this.isAdd = false |
|
|
|
|
row.isShow = true |
|
|
|
|
this.getMesg() |
|
|
|
|
}).catch((err) => {}) |
|
|
|
|
}).catch((err) => { }) |
|
|
|
|
} |
|
|
|
|
this.isAdd = false; |
|
|
|
|
row.isShow = true; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
dialogFormVisible(index, row) { |
|
|
|
|
dialogFormVisible (index, row) { |
|
|
|
|
this.isAdd = false |
|
|
|
|
row.isShow = true |
|
|
|
|
// if (!row.id) { |
|
|
|
@ -655,11 +530,11 @@ export default { |
|
|
|
|
// row.isShow = true |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
getHandleEdit(row) { |
|
|
|
|
getHandleEdit (row) { |
|
|
|
|
this.isAdd = true |
|
|
|
|
row.isShow = false |
|
|
|
|
}, |
|
|
|
|
getRuleDelete(index, row) { |
|
|
|
|
getRuleDelete (index, row) { |
|
|
|
|
if (!row.id) { |
|
|
|
|
this.tableData.splice(index, 1) |
|
|
|
|
index ? this.tableData.splice(index - 1, 1) : this.tableData.splice(0, 1) |
|
|
|
@ -684,12 +559,12 @@ export default { |
|
|
|
|
message: "删除成功!" |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
.catch((err) => {}) |
|
|
|
|
.catch((err) => { }) |
|
|
|
|
}) |
|
|
|
|
.catch(() => {}) |
|
|
|
|
.catch(() => { }) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
AddListRow() { |
|
|
|
|
AddListRow () { |
|
|
|
|
this.isAdd = true; |
|
|
|
|
this.tableData.length && this.tableData.push({}) |
|
|
|
|
this.tableData.push({ |
|
|
|
@ -718,7 +593,7 @@ export default { |
|
|
|
|
this.scrollToTop(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
scrollToTop() { |
|
|
|
|
scrollToTop () { |
|
|
|
|
const c = document.documentElement.scrollHeight || document.body.scrollHeight; |
|
|
|
|
window.scrollTo(0, c); |
|
|
|
|
}, |
|
|
|
@ -737,6 +612,7 @@ export default { |
|
|
|
|
/deep/ .el-link.el-link--primary { |
|
|
|
|
padding-right: 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/ .btn { |
|
|
|
|
line-height: 0; |
|
|
|
|
height: 30px; |
|
|
|
@ -748,44 +624,52 @@ export default { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/ .el-input__inner { |
|
|
|
|
border: 1px solid #9278ff; |
|
|
|
|
&[type=number]{ |
|
|
|
|
border: 1px solid #062c87; |
|
|
|
|
|
|
|
|
|
&[type=number] { |
|
|
|
|
padding-right: 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/ .el-form-item { |
|
|
|
|
margin-top: 15px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 第二部分 |
|
|
|
|
/deep/ .el-button--text { |
|
|
|
|
color: #9278ff; |
|
|
|
|
color: #062c87; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/ .el-button--text:focus, |
|
|
|
|
.el-button--text:hover { |
|
|
|
|
color: #9278ff; |
|
|
|
|
color: #062c87; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.border { |
|
|
|
|
width: 50px; |
|
|
|
|
height: 50px; |
|
|
|
|
border: 1px solid #9278ff; |
|
|
|
|
border: 1px solid #062c87; |
|
|
|
|
border-radius: 50%; |
|
|
|
|
margin: auto; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.p { |
|
|
|
|
font-size: 12px; |
|
|
|
|
font-weight: 600; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 文本框 |
|
|
|
|
/deep/ .el-textarea__inner { |
|
|
|
|
height: 145px; |
|
|
|
|
width: 650px; |
|
|
|
|
resize: none; |
|
|
|
|
border: 1px solid #9278ff; |
|
|
|
|
border: 1px solid #062c87; |
|
|
|
|
font-size: 12px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/ .el-textarea__inner:hover { |
|
|
|
|
border: 1px solid #9278ff; |
|
|
|
|
border: 1px solid #062c87; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 滚动条的宽度 |
|
|
|
@ -793,25 +677,30 @@ export default { |
|
|
|
|
width: 6px; // 横向滚动条 |
|
|
|
|
height: 6px; // 纵向滚动条 必写 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 滚动条的滑块 |
|
|
|
|
/deep/ ::-webkit-scrollbar-thumb { |
|
|
|
|
background-color: #9278ff; |
|
|
|
|
background-color: #062c87; |
|
|
|
|
border-radius: 3px; |
|
|
|
|
-webkit-box-shadow: inset 0 0 5px #dddddd; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/ ::-webkit-scrollbar-track { |
|
|
|
|
/*滚动条里面轨道*/ |
|
|
|
|
-webkit-box-shadow: inset 0 0 5px #dddddd; |
|
|
|
|
border-radius: 0; |
|
|
|
|
background: #dddddd; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/ .el-row { |
|
|
|
|
padding: 0 20px; |
|
|
|
|
margin-bottom: 60px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/ .el-card__body { |
|
|
|
|
padding: 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/ .el-card { |
|
|
|
|
border: none; |
|
|
|
|
} |
|
|
|
@ -820,13 +709,15 @@ export default { |
|
|
|
|
font-size: 14px; |
|
|
|
|
font-family: Microsoft YaHei; |
|
|
|
|
color: rgba(255, 255, 255, 1); |
|
|
|
|
background-color: #9278ff; |
|
|
|
|
background-color: #062c87; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.footer_b p { |
|
|
|
|
margin: 0; |
|
|
|
|
padding-left: 10px; |
|
|
|
|
font-size: 14px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.footer_b { |
|
|
|
|
padding: 10px 0; |
|
|
|
|
border-top: 1px dashed #cccccc; |
|
|
|
@ -842,47 +733,57 @@ export default { |
|
|
|
|
height: 200px; |
|
|
|
|
width: 800px; |
|
|
|
|
resize: none; |
|
|
|
|
border: 1px solid #9278ff; |
|
|
|
|
border: 1px solid #062c87; |
|
|
|
|
font-size: 12px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#memo1 { |
|
|
|
|
height: 300px; |
|
|
|
|
width: 1700px; |
|
|
|
|
resize: none; |
|
|
|
|
border: 1px solid #9278ff; |
|
|
|
|
border: 1px solid #062c87; |
|
|
|
|
font-size: 12px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
padding: 10px 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/ .el-input--suffix .el-input__inner { |
|
|
|
|
border: 1px solid #9278ff; |
|
|
|
|
border: 1px solid #062c87; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.footer_input p { |
|
|
|
|
font-size: 12px; |
|
|
|
|
padding-right: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.footer_input { |
|
|
|
|
padding: 30px 0 20px 80px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.footer_inputs { |
|
|
|
|
padding: 30px 0 20px 80px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.footer_inputs1 { |
|
|
|
|
padding-bottom: 50px; |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.footer_inputs1 p { |
|
|
|
|
margin: 0 0 15px 0; |
|
|
|
|
font-size: 14px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.footer_inputs p { |
|
|
|
|
font-size: 12px; |
|
|
|
|
padding-right: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/ .el-input { |
|
|
|
|
width: 30%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.header { |
|
|
|
|
background-color: #ffffff; |
|
|
|
|
height: 45px; |
|
|
|
@ -891,15 +792,18 @@ export default { |
|
|
|
|
font-weight: 600; |
|
|
|
|
position: relative; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.header span { |
|
|
|
|
font-size: 14px; |
|
|
|
|
font-weight: 600; |
|
|
|
|
padding-left: 5px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.header p { |
|
|
|
|
padding-left: 20px; |
|
|
|
|
margin: 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.footer_h { |
|
|
|
|
border-top: 1px dashed #cccccc; |
|
|
|
|
border-bottom: 1px dashed #cccccc; |
|
|
|
@ -907,55 +811,68 @@ export default { |
|
|
|
|
height: 45px; |
|
|
|
|
line-height: 45px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.flex { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: flex-start; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.footer { |
|
|
|
|
background-color: #ffffff; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.footer_h p { |
|
|
|
|
padding-left: 10px; |
|
|
|
|
font-size: 14px; |
|
|
|
|
margin: 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.black { |
|
|
|
|
width: 8px; |
|
|
|
|
height: 18px; |
|
|
|
|
background-color: #333; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.content { |
|
|
|
|
position: relative; |
|
|
|
|
top: 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.back { |
|
|
|
|
line-height: 3; |
|
|
|
|
padding-left: 10px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.block { |
|
|
|
|
@include block; |
|
|
|
|
height: 230px; |
|
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
|
|
.line { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
margin: 10px 0; |
|
|
|
|
|
|
|
|
|
.label { |
|
|
|
|
width: 100px; |
|
|
|
|
margin-right: 10px; |
|
|
|
|
text-align: right; |
|
|
|
|
font-size: 12px; |
|
|
|
|
&.mini{ |
|
|
|
|
|
|
|
|
|
&.mini { |
|
|
|
|
width: auto; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.action { |
|
|
|
|
flex: 1; |
|
|
|
|
text-align: left; |
|
|
|
|
|
|
|
|
|
/deep/.el-input { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&.steps { |
|
|
|
|
@include block; |
|
|
|
|
display: inline-flex; |
|
|
|
@ -963,33 +880,41 @@ export default { |
|
|
|
|
height: 150px; |
|
|
|
|
font-size: 12px; |
|
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
|
|
.radio-wrap { |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
.child { |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
margin-left: 15px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/deep/.el-radio { |
|
|
|
|
margin: 3px 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.inputs { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
/deep/.el-input { |
|
|
|
|
width: 100px; |
|
|
|
|
margin: 0 5px; |
|
|
|
|
|
|
|
|
|
&:first-child { |
|
|
|
|
margin-left: 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&.a-line { |
|
|
|
|
display: inline-flex; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.mini-textarea, |
|
|
|
|
/deep/.mini-textarea .el-textarea__inner { |
|
|
|
|
width: 100%; |
|
|
|
|