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'; // 巢湖版
} else if (dev) {
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 => {
// if (sessionStorage.getItem('token')) {
// 存在将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;
}, err => {
Message.error({
@ -106,7 +105,11 @@ function logouts(){
let referrer = store.state.referrer
store.replaceState({})
sessionStorage.removeItem('kd_client_username')
if (referrer) {
location.href = referrer
} else {
window.history.back()
}
}
let tokenStatus = {
0: '用户未登录,请登录后操作!',

@ -135,15 +135,12 @@ export default {
},
},
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
// sessionStorage.setItem('token',this.$route.query.token)
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.initData();
},

@ -206,10 +206,11 @@ export default {
};
},
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)))
}
if (this.$route.query.bcId) {
this.bcId = this.$route.query.bcId;
this.getInfoData(this.$route.query.bcId);

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

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

Loading…
Cancel
Save