yujialong 9 months ago
parent ad4113d1f1
commit 03ce15ee99
  1. 11
      src/utils/http.js
  2. 13
      src/views/Home.vue
  3. 9
      src/views/Program.vue
  4. 260
      src/views/ProgramOptions.vue
  5. 8
      src/views/Transaction.vue

@ -18,7 +18,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.217:9000'; // host = 'http://192.168.31.217:9000';
} }
} }
@ -35,10 +35,9 @@ service.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
// 请求拦截器 // 请求拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
// if (sessionStorage.getItem('token')) {
// 存在将token写入 request header // 存在将token写入 request header
config.headers.token = store.state.token const { token } = router.currentRoute.query
// } config.headers.token = token ? atob(decodeURI(token)) : localStorage.getItem('token')
return config; return config;
}, err => { }, err => {
Message.error({ Message.error({
@ -106,7 +105,11 @@ function logouts(){
let referrer = store.state.referrer let referrer = store.state.referrer
store.replaceState({}) store.replaceState({})
sessionStorage.removeItem('kd_client_username') sessionStorage.removeItem('kd_client_username')
if (referrer) {
location.href = referrer location.href = referrer
} else {
window.history.back()
}
} }
let tokenStatus = { let tokenStatus = {
0: '用户未登录,请登录后操作!', 0: '用户未登录,请登录后操作!',

@ -135,15 +135,12 @@ export default {
}, },
}, },
mounted () { mounted () {
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.systemId == 19 this.isProcess = this.systemId == 11 || this.systemId == 12 || this.systemId == 19
// sessionStorage.setItem('token',this.$route.query.token) const { token, referrer } = this.$route.query
this.$route.query.token && this.$store.commit('setParam', { if (token) {
token: atob(decodeURI(this.$route.query.token)), localStorage.setItem('token', atob(decodeURI(token)))
referrer: atob(decodeURI(this.$route.query.referrer)) localStorage.setItem('referrer', atob(decodeURI(referrer)))
}) }
this.initData(); this.initData();
}, },

@ -206,10 +206,11 @@ export default {
}; };
}, },
mounted () { mounted () {
this.$route.query.token && this.$store.commit('setParam', { const { token, referrer } = this.$route.query
token: atob(decodeURI(this.$route.query.token)), if (token) {
referrer: atob(decodeURI(this.$route.query.referrer)) localStorage.setItem('token', atob(decodeURI(token)))
}); localStorage.setItem('referrer', atob(decodeURI(referrer)))
}
if (this.$route.query.bcId) { if (this.$route.query.bcId) {
this.bcId = this.$route.query.bcId; this.bcId = this.$route.query.bcId;
this.getInfoData(this.$route.query.bcId); this.getInfoData(this.$route.query.bcId);

@ -2,16 +2,16 @@
<!-- 编程类 --> <!-- 编程类 -->
<div class="content"> <div class="content">
<div class="header flex"> <div class="header flex">
<i <i class="back el-icon-arrow-left"
class="back el-icon-arrow-left"
@click="Back()" @click="Back()"
style="cursor: pointer" style="cursor: pointer">
>
<span>Back</span> <span>Back</span>
</i> </i>
<p>判分点设置</p> <p>判分点设置</p>
<el-button class="btn" type="primary" @click="Savejump('ruleForm')">保存</el-button> <el-button class="btn"
type="primary"
@click="Savejump('ruleForm')">保存</el-button>
</div> </div>
<div class="footer"> <div class="footer">
<div> <div>
@ -20,48 +20,49 @@
<p>基本信息</p> <p>基本信息</p>
</div> </div>
<el-form <el-form :model="ruleForm"
:model="ruleForm"
:rules="rules" :rules="rules"
ref="ruleForm" ref="ruleForm"
label-width="150px" label-width="150px">
> <el-form-item label="请输入判分点名称"
<el-form-item label="请输入判分点名称" prop="judgmentPointsName"> prop="judgmentPointsName">
<el-input v-model="ruleForm.judgmentPointsName"></el-input> <el-input v-model="ruleForm.judgmentPointsName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="实验要求" prop="experimentalRequirements"> <el-form-item label="实验要求"
<quill :border="true" v-model="ruleForm.experimentalRequirements" :minHeight="150" :height="150" /> prop="experimentalRequirements">
<quill :border="true"
v-model="ruleForm.experimentalRequirements"
:minHeight="150"
:height="150" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="flex footer_b"> <div class="flex footer_b">
<div class="black"></div> <div class="black"></div>
<p>判分规则</p> <p>判分规则</p>
<el-button class="btn" type="primary" :disabled="isAdd" @click="AddListRow()" <el-button class="btn"
>新增</el-button type="primary"
> :disabled="isAdd"
@click="AddListRow()">新增</el-button>
</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"
:stripe="true" :stripe="true"
:cell-style="rowClass" :cell-style="rowClass"
:header-cell-style="headClass" :header-cell-style="headClass"
header-align="center" header-align="center"
ref="editTable" ref="editTable">
> <el-table-column prop="decisionPointRule"
<el-table-column
prop="decisionPointRule"
type="index" type="index"
label="序号" label="序号"
align="center" align="center"
width="80" width="80"></el-table-column>
></el-table-column> <el-table-column label="流程判分正确答案"
<el-table-column label="流程判分正确答案" align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.isInput"> <template v-if="scope.row.isInput">
<p class="p"> <p class="p">
@ -71,18 +72,14 @@
<div class="line"> <div class="line">
<span class="label">一级栏目</span> <span class="label">一级栏目</span>
<div class="action"> <div class="action">
<el-select <el-select v-model="scope.row.levelOne"
v-model="scope.row.levelOne"
placeholder="请选择" placeholder="请选择"
size="mini" size="mini"
@change="getSubject(scope.row)" @change="getSubject(scope.row)">
> <el-option v-for="(item, index) in stepList"
<el-option
v-for="(item, index) in stepList"
:key="index" :key="index"
:label="item.stepName" :label="item.stepName"
:value="item.id" :value="item.id"></el-option>
></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -90,18 +87,13 @@
<span class="label">子级栏目</span> <span class="label">子级栏目</span>
<div class="action steps"> <div class="action steps">
{{ scope.row.stepName }} {{ scope.row.stepName }}
<el-radio-group <el-radio-group class="radio-wrap"
class="radio-wrap"
v-model="scope.row.levelTwo" v-model="scope.row.levelTwo"
size="mini" size="mini"
@change="getOption(scope.row)" @change="getOption(scope.row)">
> <el-radio v-for="(item, index) in scope.row.subjectList"
<el-radio
v-for="(item, index) in scope.row.subjectList"
:key="index" :key="index"
:label="item.id" :label="item.id">{{ item.kdSubjectName }}</el-radio>
>{{ item.kdSubjectName }}</el-radio
>
<!-- <div class="child"> <!-- <div class="child">
<el-radio :label="9">备选项</el-radio> <el-radio :label="9">备选项</el-radio>
<el-radio :label="10">备选项</el-radio> <el-radio :label="10">备选项</el-radio>
@ -113,29 +105,25 @@
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="150"> <el-table-column align="center"
width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button v-if="scope.row.isInput"
v-if="scope.row.isInput"
type="primary" type="primary"
:disabled="scope.row.isShow" :disabled="scope.row.isShow"
style="cursor: pointer; border-radius: 50%" style="cursor: pointer; border-radius: 50%"
circle circle
@click="getPerhaps(scope.row)" @click="getPerhaps(scope.row)">{{ scope.row.operatorOne == 1 ? "且" : "或" }}</el-button>
>{{ scope.row.operatorOne == 1 ? "且" : "或" }}</el-button <el-button v-else
>
<el-button
v-else
type="primary" type="primary"
:disabled="scope.row.isShow" :disabled="scope.row.isShow"
style="cursor: pointer; border-radius: 50%" style="cursor: pointer; border-radius: 50%"
circle circle
@click="getPerhapsColumn(scope.row)" @click="getPerhapsColumn(scope.row)">{{ operatorTwo == 1 ? "且" : "或" }}</el-button>
>{{ operatorTwo == 1 ? "且" : "或" }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="交易结果正确答案" align="center"> <el-table-column label="交易结果正确答案"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.isInput"> <template v-if="scope.row.isInput">
<p class="p"> <p class="p">
@ -145,24 +133,21 @@
<template v-if="scope.row.levelTwo"> <template v-if="scope.row.levelTwo">
<template v-if="scope.row.type == 1 && scope.row.subjectName"> <template v-if="scope.row.type == 1 && scope.row.subjectName">
<div class="line"> <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>
<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 multiple
multiple
v-model="scope.row.levelFour" v-model="scope.row.levelFour"
placeholder="请选择" placeholder="请选择"
size="mini" size="mini"
style="width: 100%" style="width: 100%">
> <el-option v-for="(item, index) in scope.row.optionList"
<el-option
v-for="(item, index) in scope.row.optionList"
:key="index" :key="index"
:label="item.itemDescription" :label="item.itemDescription"
:value="item.id" :value="item.id"></el-option>
></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -172,29 +157,25 @@
<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.symbolInput1"
v-model="scope.row.symbolInput1"
placeholder="请选择" placeholder="请选择"
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="["
value="["></el-option>
</el-select> </el-select>
<el-input <el-input v-model="scope.row.symbolInput2"
v-model="scope.row.symbolInput2" size="mini"></el-input>
size="mini" <el-input v-model="scope.row.symbolInput3"
></el-input> size="mini"></el-input>
<el-input <el-select v-model="scope.row.symbolInput4"
v-model="scope.row.symbolInput3"
size="mini"
></el-input>
<el-select
v-model="scope.row.symbolInput4"
placeholder="请选择" placeholder="请选择"
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="]"
value="]"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -204,28 +185,21 @@
<div class="line"> <div class="line">
<span class="label"> <span class="label">
<el-checkbox v-model="scope.row.numOfWords">字数要求</el-checkbox> <el-checkbox v-model="scope.row.numOfWords">字数要求</el-checkbox>
</span </span>
>
<div class="action a-line"> <div class="action a-line">
<el-select <el-select v-model="scope.row.symbol"
v-model="scope.row.symbol"
placeholder="请选择" placeholder="请选择"
size="mini" size="mini">
> <el-option v-for="(item, index) in symbolList"
<el-option
v-for="(item, index) in symbolList"
:key="index" :key="index"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"></el-option>
></el-option>
</el-select> </el-select>
<el-input <el-input type="number"
type="number"
min="0" min="0"
style="margin-left: 5px" style="margin-left: 5px"
size="mini" size="mini"
v-model="scope.row.numDes" v-model="scope.row.numDes"></el-input>
></el-input>
</div> </div>
</div> </div>
<div class="line"> <div class="line">
@ -233,13 +207,11 @@
<el-checkbox v-model="scope.row.fieldOfReq">字段要求</el-checkbox> <el-checkbox v-model="scope.row.fieldOfReq">字段要求</el-checkbox>
</span> </span>
<div class="action"> <div class="action">
<el-input <el-input class="mini-textarea"
class="mini-textarea"
type="textarea" type="textarea"
cols="3" cols="3"
size="mini" size="mini"
v-model="scope.row.levelFour" v-model="scope.row.levelFour"></el-input>
></el-input>
</div> </div>
</div> </div>
</template> </template>
@ -247,17 +219,13 @@
<div class="line"> <div class="line">
<span class="label">选择指标</span> <span class="label">选择指标</span>
<div class="action"> <div class="action">
<el-select <el-select v-model="scope.row.levelThree"
v-model="scope.row.levelThree"
placeholder="请选择" placeholder="请选择"
size="mini" size="mini">
> <el-option v-for="(item, index) in scope.row.optionList"
<el-option
v-for="(item, index) in scope.row.optionList"
:key="index" :key="index"
:label="item.itemDescription" :label="item.itemDescription"
:value="item.id" :value="item.id"></el-option>
></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -265,31 +233,27 @@
<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.symbolInput1"
v-model="scope.row.symbolInput1"
placeholder="请选择" placeholder="请选择"
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="["
value="["></el-option>
</el-select> </el-select>
<el-input <el-input type="number"
type="number"
v-model="scope.row.symbolInput2" v-model="scope.row.symbolInput2"
size="mini" size="mini"></el-input>
></el-input> <el-input type="number"
<el-input
type="number"
v-model="scope.row.symbolInput3" v-model="scope.row.symbolInput3"
size="mini" size="mini"></el-input>
></el-input> <el-select v-model="scope.row.symbolInput4"
<el-select
v-model="scope.row.symbolInput4"
placeholder="请选择" placeholder="请选择"
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="]"
value="]"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -300,41 +264,31 @@
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作"
align="center"
width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.isInput"> <template v-if="scope.row.isInput">
<el-link <el-link size="mini"
size="mini"
type="primary" type="primary"
:underline="false" :underline="false"
v-show="scope.row.isShow" v-show="scope.row.isShow"
@click="getHandleEdit(scope.row)" @click="getHandleEdit(scope.row)">编辑</el-link>
>编辑</el-link <el-link type="primary"
>
<el-link
type="primary"
size="mini" size="mini"
:underline="false" :underline="false"
v-show="!scope.row.isShow" v-show="!scope.row.isShow"
@click="getRule(scope.row)" @click="getRule(scope.row)">保存</el-link>
>保存</el-link <el-link size="mini"
>
<el-link
size="mini"
type="primary" type="primary"
:underline="false" :underline="false"
v-show="!scope.row.isShow && !scope.row.id" v-show="!scope.row.isShow && !scope.row.id"
@click="dialogFormVisible(scope.$index, scope.row)" @click="dialogFormVisible(scope.$index, scope.row)">取消</el-link>
>取消</el-link <el-link size="mini"
>
<el-link
size="mini"
type="primary" type="primary"
:underline="false" :underline="false"
v-show="!scope.row.isShow" v-show="!scope.row.isShow"
@click="getRuleDelete(scope.$index, scope.row)" @click="getRuleDelete(scope.$index, scope.row)">删除</el-link>
>删除</el-link
>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
@ -406,7 +360,11 @@ export default {
}, },
components: { quill }, components: { quill },
mounted () { mounted () {
this.$route.query.token && this.$store.commit('setParam',{token: atob(decodeURI(this.$route.query.token)),referrer: atob(decodeURI(this.$route.query.referrer))}) const { token, referrer } = this.$route.query
if (token) {
localStorage.setItem('token', atob(decodeURI(token)))
localStorage.setItem('referrer', atob(decodeURI(referrer)))
}
this.getData() this.getData()
}, },
methods: { methods: {
@ -775,7 +733,7 @@ export default {
/deep/ .el-input__inner { /deep/ .el-input__inner {
border: 1px solid #9278ff; border: 1px solid #9278ff;
&[type=number]{ &[type='number'] {
padding-right: 0; padding-right: 0;
} }
} }

@ -563,9 +563,11 @@ export default {
}) })
}, },
mounted () { mounted () {
this.$route.query.token && this.$store.commit("setParam", { const { token, referrer } = this.$route.query
token: atob(decodeURI(this.$route.query.token)) if (token) {
}); localStorage.setItem('token', atob(decodeURI(token)))
localStorage.setItem('referrer', atob(decodeURI(referrer)))
}
if (this.isSt) { if (this.isSt) {
this.leftSymbols = [ this.leftSymbols = [
{ {

Loading…
Cancel
Save