yujialong 6 months ago
parent 4c5f0d81db
commit dae24e7cf7
  1. 5
      src/utils/api.js
  2. 32
      src/utils/http.js
  3. 186
      src/views/Home.vue
  4. 376
      src/views/Transaction.vue
  5. 20
      vue.config.js

@ -22,6 +22,9 @@ export default {
bandingProject: `/judgment/judgment/lcJudgmentPoint/bandingProject`, // 绑定项目管理 bandingProject: `/judgment/judgment/lcJudgmentPoint/bandingProject`, // 绑定项目管理
queryAllJudgmentPoint: `/judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表 queryAllJudgmentPoint: `/judgment/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表
queryJudgmentPointDetails: `/judgment/judgment/lcJudgmentPoint/queryJudgmentPointDetails`, // 获取判分点详细信息 queryJudgmentPointDetails: `/judgment/judgment/lcJudgmentPoint/queryJudgmentPointDetails`, // 获取判分点详细信息
copyJudgmentPoint: `/judgment/judgment/lcJudgmentPoint/copyJudgmentPoint`,
obtainTheCopyInformationAndEdit: `/judgment/judgment/lcJudgmentPoint/obtainTheCopyInformationAndEdit`,
obtainPreReplicationInformation: `/judgment/judgment/lcJudgmentPoint/obtainPreReplicationInformation`,
// 编程类 // 编程类
getBcJudgmentPoint: `/judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取判分点列表(分页) getBcJudgmentPoint: `/judgment/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取判分点列表(分页)
@ -55,7 +58,7 @@ export default {
UpdateIsOpen: `/judgment/judgment/pointOfJudgement/updateIsOpen`, //修改判分点状态 UpdateIsOpen: `/judgment/judgment/pointOfJudgement/updateIsOpen`, //修改判分点状态
queryUserIds:`/liuwanr/userInfo/queryUserIds`, queryUserIds: `/liuwanr/userInfo/queryUserIds`,
// 科大子系统 // 科大子系统

@ -7,16 +7,16 @@ let host = location.origin
const dev = process.env.NODE_ENV === 'development' // 本地 const dev = process.env.NODE_ENV === 'development' // 本地
// 科大接口切换,参数里带host的为科大,否则就是职站中台 // 科大接口切换,参数里带host的为科大,否则就是职站中台
let isKd = /&host=(\d)/.exec(location.hash) //host:{1:测试环境,2:正式环境} let isKd = /&host=(\d)/.exec(location.hash) //host:{1:测试环境,2:正式环境}
if(isKd){ if (isKd) {
host = isKd[1] == 1 ? 'http://122.9.154.146' : 'http://116.63.168.79' host = isKd[1] == 1 ? 'http://122.9.154.146' : 'http://116.63.168.79'
}else{ } else {
let url = location.host; let url = location.host;
// 职站中台接口切换 // 职站中台接口切换
if (url.includes('124.71.12.62')) { if (url.includes('124.71.12.62')) {
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.51:9000'; host = 'http://192.168.31.217:9000';
} }
} }
@ -38,23 +38,23 @@ service.interceptors.request.use(config => {
const { token } = router.currentRoute.query const { token } = router.currentRoute.query
config.headers.token = token ? atob(decodeURI(token)) : localStorage.getItem('token') config.headers.token = token ? atob(decodeURI(token)) : localStorage.getItem('token')
return config; return config;
}, err => { }, err => {
Message.error({ Message.error({
message: '退出登陆', message: '退出登陆',
onClose: function () { onClose: function () {
router.push({name: 'login'}); router.push({ name: 'login' });
} }
}) })
return Promise.reject(err); return Promise.reject(err);
}) })
service.interceptors.response.use( service.interceptors.response.use(
response => { response => {
const res = response.data; const res = response.data;
if (res.status == 200 || res.status == 10000 || res.status == 30001) { if (res.status == 200 || res.status == 10000 || res.status == 30001) {
return Promise.resolve(res).catch(e => {}); return Promise.resolve(res).catch(e => { });
} else if (!res.status) { } else if (!res.status) {
return Promise.resolve(res).catch(e => {}); return Promise.resolve(res).catch(e => { });
} else { } else {
Message.error(res.message); Message.error(res.message);
return Promise.reject(res) return Promise.reject(res)
@ -71,7 +71,7 @@ service.interceptors.request.use(config => {
case 401: case 401:
if (!logouted) { if (!logouted) {
Message.error("登录过期,请重新登录"); Message.error("登录过期,请重新登录");
setTimeout(logouts,1500) setTimeout(logouts, 1500)
logouted = 1 logouted = 1
} }
break; break;
@ -87,7 +87,7 @@ service.interceptors.request.use(config => {
// 清除token // 清除token
// store.commit('loginSuccess', null); // store.commit('loginSuccess', null);
// 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面 // 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面
setTimeout(logouts,1500) setTimeout(logouts, 1500)
break; break;
// 404请求不存在 // 404请求不存在
case 404: case 404:
@ -103,7 +103,7 @@ service.interceptors.request.use(config => {
} }
); );
function logouts(){ function logouts () {
let referrer = store.state.referrer let referrer = store.state.referrer
store.replaceState({}) store.replaceState({})
if (referrer) { if (referrer) {
@ -113,7 +113,7 @@ function logouts(){
} }
} }
function get(url, params) { function get (url, params) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
service.get(url, { params: params }).then(res => { service.get(url, { params: params }).then(res => {
resolve(res); resolve(res);
@ -123,7 +123,7 @@ function get(url, params) {
}); });
} }
function post(url, params) { function post (url, params) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
service.post(url, params).then(res => { service.post(url, params).then(res => {
resolve(res); resolve(res);
@ -133,7 +133,7 @@ function post(url, params) {
}); });
} }
function del(url, params) { function del (url, params) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
service.delete(url, { service.delete(url, {
params params
@ -145,7 +145,7 @@ function del(url, params) {
}); });
} }
function put(url, params) { function put (url, params) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
service.put(url, params).then(res => { service.put(url, params).then(res => {
resolve(res); resolve(res);

@ -1,9 +1,7 @@
<template> <template>
<div class="content"> <div class="content">
<div class="header flex"> <div class="header flex">
<i class="el-icon-arrow-left" <i class="el-icon-arrow-left" @click="back" style="cursor:pointer">
@click="BackMain()"
style="cursor:pointer">
<span>Back</span> <span>Back</span>
</i> </i>
@ -11,78 +9,51 @@
</div> </div>
<div class="footer"> <div class="footer">
<div class="footer_h"> <div class="footer_h">
<div class="black" <div class="black" style="float: left"></div>
style="float: left"></div>
<p style="float: left">判分点列表</p> <p style="float: left">判分点列表</p>
</div> </div>
<div class="flex footer_h"> <div class="flex footer_h">
<div style="width: 300px;float: left"> <div style="width: 300px;float: left">
<el-input placeholder="请输入判分点名称" <el-input placeholder="请输入判分点名称" style="height: 33px;width:100%" prefix-icon="el-icon-search"
style="height: 33px;width:100%" v-model="keyword" clearable></el-input>
prefix-icon="el-icon-search"
v-model="keyword"
clearable></el-input>
</div> </div>
<div style="float: right"> <div style="float: right">
<el-button class="button" <el-button class="button" style="height: 33px;line-height: 0px" @click="HomepageJump()">新增</el-button>
style="height: 33px;line-height: 0px" <el-button class="button" style="height: 33px;line-height: 0px" @click="deletes()">批量删除</el-button>
@click="HomepageJump()">新增</el-button> <el-button v-if="systemId == 19" class="button" style="height: 33px;line-height: 0px"
<el-button class="button" @click="batchCopy">批量复制</el-button>
style="height: 33px;line-height: 0px"
@click="deletes()">批量删除</el-button>
</div> </div>
</div> </div>
<div> <div>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover"> <el-card shadow="hover">
<el-table :data="tableData" <el-table :data="tableData" :cell-style="rowClass" :header-cell-style="headClass" :stripe="true"
:cell-style="rowClass" header-align="center" @selection-change="handleSelectionChange">
:header-cell-style="headClass" <el-table-column type="selection" width="55">
:stripe="true"
header-align="center"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55">
</el-table-column> </el-table-column>
<el-table-column type="index" <el-table-column type="index" label="序号" width="80" align="center">
label="序号"
align="center">
<template slot-scope="scope">{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</template> <template slot-scope="scope">{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="name" <el-table-column prop="name" label="判分点名称" align="center"></el-table-column>
label="判分点名称" <el-table-column label="实验要求" align="center">
align="center"></el-table-column>
<el-table-column label="实验要求"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="ql-snow"> <div class="ql-snow">
<div class="ql-editor" <div class="ql-editor" v-html="scope.row.experimentalRequirements"></div>
v-html="scope.row.experimentalRequirements"></div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="operate" <el-table-column prop="operate" label="操作" align="center">
label="操作"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleEdit(scope.row)" <el-button v-if="systemId == 19" @click="copy(scope.row)" type="text" size="small">复制</el-button>
type="text" <el-button @click="handleEdit(scope.row)" type="text" size="small">编辑</el-button>
size="small">编辑</el-button> <el-button @click="handleDelete(scope.row)" type="text" size="small">删除</el-button>
<el-button @click="handleDelete(scope.row)"
type="text"
size="small">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="isOpen" <el-table-column prop="isOpen" label="是否启用" align="center" width="130">
label="是否启用"
align="center"
min-width="20%">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.isOpen" <el-switch v-model="scope.row.isOpen" :active-value="0" :inactive-value="1"
:active-value="0"
:inactive-value="1"
@change="changeSwitch(scope.row)"></el-switch> @change="changeSwitch(scope.row)"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
@ -93,15 +64,30 @@
<!-- 分页 --> <!-- 分页 -->
<div class="block"> <div class="block">
<el-pagination background <el-pagination background @current-change="handleCurrentChange" :current-page="pageNum" :page-size="10"
@current-change="handleCurrentChange" layout="total,prev, pager, next, jumper" :total="dataTotal"></el-pagination>
:current-page="pageNum"
:page-size="10"
layout="total,prev, pager, next, jumper"
:total="dataTotal"></el-pagination>
</div> </div>
</div> </div>
</div> </div>
<el-dialog title="复制" :visible.sync="copyVisible" width="500px" center :close-on-click-modal="false">
<el-form label-width="90px" v-loading="beforeCopying">
<el-form-item v-if="curRow" prop="name" label="判分点名称">
<el-input size="small" placeholder="请输入判分点名称" v-model="form.name"></el-input>
</el-form-item>
<el-form-item prop="checkpointId" label="关联关卡">
<el-select size="small" v-model="form.checkpointId" placeholder="请选择关联关卡">
<el-option v-for="(item, i) in checkpoints" :key="i" :label="item.customsPassName"
:value="item.checkpointId">
</el-option>
</el-select>
</el-form-item>
</el-form>
<span v-if="!beforeCopying" slot="footer" class="dialog-footer">
<el-button size="small" @click="copyVisible = false">取消</el-button>
<el-button type="primary" size="small" :loading="copying" @click="copySubmit">确定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
@ -122,6 +108,15 @@ export default {
systemName: this.$route.query.systemName, systemName: this.$route.query.systemName,
isProcess: false, // isProcess: false, //
multipleSelection: [], multipleSelection: [],
curRow: {},
copyVisible: false,
checkpoints: [],
form: {
name: '',
checkpointId: '',
},
beforeCopying: false,
copying: false,
}; };
}, },
components: { quill }, components: { quill },
@ -143,11 +138,9 @@ export default {
} }
this.initData(); this.initData();
this.getCheckpoint()
}, },
methods: { methods: {
BackMain () { //
history.back()
},
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.pageNum = val; this.pageNum = val;
this.initData(); this.initData();
@ -275,6 +268,77 @@ export default {
this.$router.push(`program?isAdd=true&systemId=${this.systemId}`); this.$router.push(`program?isAdd=true&systemId=${this.systemId}`);
} }
}, },
//
batchCopy () {
if (this.multipleSelection.length) {
this.form = {
name: '',
checkpointId: '',
}
this.curRow = null
this.copyVisible = true
} else {
this.$message.warning("请先选择数据 !");
}
},
//
async copy (row) {
this.curRow = row
this.copyVisible = true
this.beforeCopying = true
//
const res = await this.$post(this.api.obtainPreReplicationInformation, {
lcId: row.lcId
})
this.beforeCopying = false
this.form = {
name: res.newName || '',
checkpointId: +res.checkpointId || '',
}
},
//
async copySubmit () {
const { name, checkpointId } = this.form
const list = this.multipleSelection
if (!list.length && !name) return this.$message.warning('请输入判分点名称')
if (!checkpointId) return this.$message.warning('请选择关联关卡')
try {
this.copying = true
if (list.length) {
//
await this.$post(this.api.copyJudgmentPoint, {
checkpointId,
lcIds: list.map(e => e.lcId)
})
} else {
//
await this.$post(this.api.obtainTheCopyInformationAndEdit, {
name,
checkpointId,
lcId: this.curRow.lcId,
})
}
this.copying = false
this.initData()
this.$message.success('复制成功!')
this.copyVisible = false
} catch (e) {
this.copying = false
}
},
//
async getCheckpoint () {
const { data } = await this.$post(this.api.checkpointList, {
platformId: 3,
isEnable: 1
})
data.forEach(e => {
e.name = e.customsPassName
e.id = e.checkpointId
})
this.checkpoints = data
},
handleEdit (row) { // handleEdit (row) { //
if (this.isProcess) { if (this.isProcess) {
// //
@ -358,6 +422,9 @@ export default {
rowClass () { rowClass () {
return "text-align: center;"; return "text-align: center;";
}, },
back () {
history.back()
},
} }
}; };
</script> </script>
@ -495,6 +562,7 @@ export default {
border-radius: 20px; border-radius: 20px;
float: right; float: right;
} }
.button:focus { .button:focus {
outline: 0; outline: 0;
} }

@ -1,23 +1,15 @@
<template> <template>
<!-- 交易类 --> <!-- 交易类 -->
<div class="content" <div class="content" v-loading="loading" element-loading-text="加载中" element-loading-spinner="el-icon-loading">
v-loading="loading"
element-loading-text="加载中"
element-loading-spinner="el-icon-loading">
<div class="header"> <div class="header">
<div> <div>
<i class="back el-icon-arrow-left" <i class="back el-icon-arrow-left" @click="Back()" style="cursor:pointer">
@click="Back()"
style="cursor:pointer">
<span>Back</span> <span>Back</span>
</i> </i>
<span class="title">判分点设置</span> <span class="title">判分点设置</span>
</div> </div>
<div> <div>
<el-button v-if="!isView" <el-button v-if="!isView" type="primary" size="mini" @click="submit">保存</el-button>
type="primary"
size="mini"
@click="submit">保存</el-button>
</div> </div>
</div> </div>
@ -29,21 +21,13 @@
</div> </div>
<div class="item"> <div class="item">
<div class="label">判分点</div> <div class="label">判分点</div>
<el-input v-model.trim="formData.lcJudgmentPoint.name" <el-input v-model.trim="formData.lcJudgmentPoint.name" :readonly="isView" @blur="handleBlur"
:readonly="isView" placeholder="请输入内容" clearable style="width: 400px"></el-input>
@blur="handleBlur"
placeholder="请输入内容"
clearable
style="width: 400px"></el-input>
</div> </div>
<div class="item"> <div class="item">
<div class="label">实验要求</div> <div class="label">实验要求</div>
<quill class="quill" <quill class="quill" v-model="formData.lcJudgmentPoint.experimentalRequirements" :readonly="isView"
v-model="formData.lcJudgmentPoint.experimentalRequirements" :border="true" :minHeight="150" :height="150" />
:readonly="isView"
:border="true"
:minHeight="150"
:height="150" />
</div> </div>
</div> </div>
@ -54,128 +38,76 @@
<div>判分规则</div> <div>判分规则</div>
</div> </div>
</div> </div>
<el-dialog :visible.sync="configVisible" <el-dialog :visible.sync="configVisible" width="25%" title="批量新增判分点" center :append-to-body="false">
width="25%"
title="批量新增判分点"
center
:append-to-body="false">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div style="width: 100%;height: 400px;overflow: auto;margin: auto;background: #F5F5F5"> <div style="width: 100%;height: 400px;overflow: auto;margin: auto;background: #F5F5F5">
<el-tree class="add-tree" <el-tree class="add-tree" style="background: #F5F5F5" :data="treeData" @check="currentChecked"
style="background: #F5F5F5" header-align="center" show-checkbox ref="tree" node-key="operationIds" :props="defaultProps"
:data="treeData"
@check="currentChecked"
header-align="center"
show-checkbox
ref="tree"
node-key="operationIds"
:props="defaultProps"
v-if="configVisible"> v-if="configVisible">
<span class="custom-tree-node" <span class="custom-tree-node" slot-scope="{ node, data }">
slot-scope="{ node, data }">
<span>{{ node.label }}</span> <span>{{ node.label }}</span>
<em class="exist" <em class="exist" v-if="data.exist">已导入</em>
v-if="data.exist">已导入</em>
</span> </span>
</el-tree> </el-tree>
</div> </div>
</div> </div>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="configVisible = false"> </el-button> <el-button @click="configVisible = false"> </el-button>
<el-button type="primary" <el-button type="primary" @click="handleConfirm"> </el-button>
@click="handleConfirm"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-card shadow="hover" <el-card shadow="hover" style="margin-bottom: 20px">
style="margin-bottom: 20px">
<div class="business-wrap"> <div class="business-wrap">
<div class="business"> <div class="business">
<div class="label">{{isSt ? '关卡' : '业务'}}</div> <div class="label">{{ isSt ? '关卡' : '业务' }}</div>
<el-select v-model="formData.lcJudgmentPoint.business" <el-select v-model="formData.lcJudgmentPoint.business" :placeholder="'请选择' + (isSt ? '关卡' : '业务')">
:placeholder="'请选择' + (isSt ? '关卡' : '业务')"> <el-option v-for="(item, i) in businessList" :key="i" :label="item.name" :value="item.id"></el-option>
<el-option v-for="(item, i) in businessList"
:key="i"
:label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</div> </div>
<div> <div>
<el-button v-if="!isView" <el-button v-if="!isView" type="primary" size="mini" @click="batchDel">批量删除</el-button>
type="primary" <el-button v-if="!isView" type="primary" size="mini" @click="saveAll">一键保存</el-button>
size="mini" <el-button v-if="!isView" type="primary" size="mini" @click="addRules">新增</el-button>
@click="batchDel">批量删除</el-button>
<el-button v-if="!isView"
type="primary"
size="mini"
@click="saveAll">一键保存</el-button>
<el-button v-if="!isView"
type="primary"
size="mini"
@click="addRules">新增</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover"> <el-card shadow="hover">
<el-table class="lc-table" <el-table class="lc-table" :data="tableData" :stripe="true" row-key="i" header-align="center"
:data="tableData"
:stripe="true"
row-key="i"
header-align="center"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" <el-table-column type="selection" width="55">
width="55">
</el-table-column> </el-table-column>
<el-table-column prop="indexNo" <el-table-column prop="indexNo" type="index" label="序号" width="80">
type="index"
label="序号"
width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isSubject && scope.row.index + 1 }} {{ scope.row.isSubject && scope.row.index + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="流程类考核点"> <el-table-column label="流程类考核点">
<template slot-scope="scope" <template slot-scope="scope" v-if="scope.row.isSubject">
v-if="scope.row.isSubject">
<p class="p">操作一致性规则用户完成的功能操作与下方设置的操作点一致</p> <p class="p">操作一致性规则用户完成的功能操作与下方设置的操作点一致</p>
<div class="tree-con"> <div class="tree-con">
<div class="block1" <div class="block1" :id="'divTree' + scope.$index">
:id="'divTree'+scope.$index"> <el-tree :data="scope.row.operationIData" :props="defaultProp" :default-expand-all="true"></el-tree>
<el-tree :data="scope.row.operationIData"
:props="defaultProp"
:default-expand-all="true"></el-tree>
</div> </div>
<div v-show="scope.row.isDisabled" <div v-show="scope.row.isDisabled" class="mask"></div>
class="mask"></div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label=" " <el-table-column label=" " width="150" align="center">
width="150"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button circle <el-button circle type="primary" v-if="scope.row.isSubject"
type="primary" :disabled="isSt || isView || scope.row.isDisabled" @click="changeResult(scope.row)">
v-if="scope.row.isSubject"
:disabled="isSt || isView || scope.row.isDisabled"
@click="changeResult(scope.row)">
{{ scope.row.resultOperation === 0 ? "且" : "或" }} {{ scope.row.resultOperation === 0 ? "且" : "或" }}
</el-button> </el-button>
<el-button v-else <el-button v-else type="primary" circle @click="changeRule(scope.row, scope.$index)">
type="primary"
circle
@click="changeRule(scope.row, scope.$index)">
{{ scope.row.ruleOperation === 0 ? "且" : "或" }} {{ scope.row.ruleOperation === 0 ? "且" : "或" }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="正确答案"> <el-table-column label="正确答案">
<template slot-scope="scope" <template slot-scope="scope" v-if="scope.row.isSubject">
v-if="scope.row.isSubject"> <p class="p" style="margin-top: 1px">交易结果一致性规则用户交易结果需要与下面设置的交易结果指标要求一致</p>
<p class="p"
style="margin-top: 1px">交易结果一致性规则用户交易结果需要与下面设置的交易结果指标要求一致</p>
<div class="block"> <div class="block">
<!-- type: 题目类型(1选择 2判断 3填空 4问答 5指标结果) --> <!-- type: 题目类型(1选择 2判断 3填空 4问答 5指标结果) -->
<div v-if="scope.row.operationIds && scope.row.type == null" <div v-if="scope.row.operationIds && scope.row.type == null"
@ -189,15 +121,10 @@
<span class="label mini">正确答案</span> <span class="label mini">正确答案</span>
<div class="action"> <div class="action">
<!--multiple:多选--> <!--multiple:多选-->
<el-select v-model="scope.row.value1" <el-select v-model="scope.row.value1" :disabled="isView || scope.row.isDisabled" size="mini"
:disabled="isView || scope.row.isDisabled" :multiple="isSt" style="width: 100%;overflow: hidden;">
size="mini" <el-option v-for="(item, i) in isSt ? scope.row.stItems : scope.row.lcItems" :key="i"
:multiple="isSt" :label="item.options" :value="item.itemId"></el-option>
style="width: 100%;overflow: hidden;">
<el-option v-for="(item, i) in isSt ? scope.row.stItems : scope.row.lcItems"
:key="i"
:label="item.options"
:value="item.itemId"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -212,13 +139,9 @@
<div class="line"> <div class="line">
<span class="label mini">正确答案</span> <span class="label mini">正确答案</span>
<div class="action"> <div class="action">
<el-select v-model="scope.row.value1" <el-select v-model="scope.row.value1" :disabled="isView || scope.row.isDisabled" size="mini"
:disabled="isView || scope.row.isDisabled"
size="mini"
style="width: 100%;"> style="width: 100%;">
<el-option v-for="(item, i) in scope.row.lcItems" <el-option v-for="(item, i) in scope.row.lcItems" :key="i" :label="item.options"
:key="i"
:label="item.options"
:value="item.subjectId"></el-option> :value="item.subjectId"></el-option>
</el-select> </el-select>
</div> </div>
@ -228,19 +151,14 @@
<template v-if="scope.row.type == 3"> <template v-if="scope.row.type == 3">
<div class="box"> <div class="box">
<div class="line" <div class="line" style="min-height: 100%;">
style="min-height: 100%;">
<span class="label"> <span class="label">
<!--<el-checkbox v-model="scope.row.fieldOfReq" :disabled="isView || scope.row.isDisabled">字段要求</el-checkbox>--> <!--<el-checkbox v-model="scope.row.fieldOfReq" :disabled="isView || scope.row.isDisabled">字段要求</el-checkbox>-->
字段要求 字段要求
</span> </span>
<div class="action"> <div class="action">
<el-input class="mini-textarea" <el-input class="mini-textarea" type="textarea" rows="6" size="mini"
type="textarea" v-model.trim="scope.row.value1" :disabled="isView || scope.row.isDisabled"
rows="6"
size="mini"
v-model.trim="scope.row.value1"
:disabled="isView || scope.row.isDisabled"
placeholder="字段之间以逗号隔开"></el-input> placeholder="字段之间以逗号隔开"></el-input>
</div> </div>
</div> </div>
@ -255,30 +173,17 @@
字数要求 字数要求
</span> </span>
<div class="action a-line"> <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">
:disabled="isView || scope.row.isDisabled" <el-option label=">" value=">"></el-option>
size="mini"> <el-option label="<" value="<"></el-option>
<el-option label=">" <el-option label="=" value="="></el-option>
value=">"></el-option> <el-option label=">=" value=">="></el-option>
<el-option label="<" <el-option label="<=" value="<="></el-option>
value="<"></el-option> <el-option label="无限制" value="无限制"></el-option>
<el-option label="="
value="="></el-option>
<el-option label=">="
value=">="></el-option>
<el-option label="<="
value="<="></el-option>
<el-option label="无限制"
value="无限制"></el-option>
</el-select> </el-select>
<el-input class="number-input" <el-input class="number-input" v-model.trim="scope.row.value2"
v-model.trim="scope.row.value2" :disabled="isView || scope.row.isDisabled" onkeyup="value=this.value.replace(/\D+/g,'')"
:disabled="isView || scope.row.isDisabled" oninput="value=value.replace(/[^0-9.]/g,'')" type="number" min="1" size="mini"
onkeyup="value=this.value.replace(/\D+/g,'')"
oninput="value=value.replace(/[^0-9.]/g,'')"
type="number"
min="1"
size="mini"
style="margin-left: 5px;"></el-input> style="margin-left: 5px;"></el-input>
</div> </div>
</div> </div>
@ -288,12 +193,8 @@
字段要求 字段要求
</span> </span>
<div class="action"> <div class="action">
<el-input class="mini-textarea" <el-input class="mini-textarea" type="textarea" rows="5" size="mini"
type="textarea" v-model.trim="scope.row.value3" :disabled="isView || scope.row.isDisabled"
rows="5"
size="mini"
v-model.trim="scope.row.value3"
:disabled="isView || scope.row.isDisabled"
placeholder="字段之间以逗号隔开"></el-input> placeholder="字段之间以逗号隔开"></el-input>
</div> </div>
</div> </div>
@ -301,55 +202,31 @@
</template> </template>
<template v-if="scope.row.type == 5"> <template v-if="scope.row.type == 5">
<div class="box" <div class="box" style="padding: 0;">
style="padding: 0;">
<div class="line"> <div class="line">
<div>{{ scope.row.name }}</div> <div>{{ scope.row.name }}</div>
</div> </div>
<div class="line" <div class="line" style="flex-direction: column;">
style="flex-direction: column;">
<p class="label">交易指标区间</p> <p class="label">交易指标区间</p>
<div class="action"> <div class="action">
<div class="inputs range"> <div class="inputs range">
<el-select v-model="scope.row.value2" <el-select v-model="scope.row.value2" :disabled="isView || scope.row.isDisabled" size="mini"
:disabled="isView || scope.row.isDisabled" clearable placeholder="符号">
size="mini" <el-option v-for="(item, i) in leftSymbols" :key="i" :value="item.name"></el-option>
clearable
placeholder="符号">
<el-option v-for="(item, i) in leftSymbols"
:key="i"
:value="item.name"></el-option>
</el-select> </el-select>
<el-input class="number-input" <el-input class="number-input" v-model.trim="scope.row.value3"
v-model.trim="scope.row.value3" :disabled="isView || scope.row.isDisabled" size="mini" placeholder="数值" />
:disabled="isView || scope.row.isDisabled" <el-input class="number-input" v-model.trim="scope.row.value4"
size="mini" :disabled="isView || scope.row.isDisabled" size="mini" placeholder="单位" />
placeholder="数值" />
<el-input class="number-input"
v-model.trim="scope.row.value4"
:disabled="isView || scope.row.isDisabled"
size="mini"
placeholder="单位" />
<span>~</span> <span>~</span>
<el-input class="number-input" <el-input class="number-input" v-model.trim="scope.row.value5"
v-model.trim="scope.row.value5" :disabled="isView || scope.row.isDisabled" size="mini" placeholder="数值" />
:disabled="isView || scope.row.isDisabled" <el-input class="number-input" v-model.trim="scope.row.value6"
size="mini" :disabled="isView || scope.row.isDisabled" size="mini" placeholder="单位" />
placeholder="数值" /> <el-select :disabled="isView || scope.row.isDisabled" v-model="scope.row.value7" size="mini"
<el-input class="number-input" clearable placeholder="符号">
v-model.trim="scope.row.value6" <el-option v-for="(item, i) in rightSymbols" :key="i" :value="item.name"></el-option>
:disabled="isView || scope.row.isDisabled"
size="mini"
placeholder="单位" />
<el-select :disabled="isView || scope.row.isDisabled"
v-model="scope.row.value7"
size="mini"
clearable
placeholder="符号">
<el-option v-for="(item, i) in rightSymbols"
:key="i"
:value="item.name"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -360,91 +237,51 @@
<template v-if="scope.row.type == 6"> <template v-if="scope.row.type == 6">
<div class="box money-box"> <div class="box money-box">
<div class="line"> <div class="line">
<el-checkbox class="money-check" <el-checkbox class="money-check" v-model="scope.row.check1"
v-model="scope.row.check1"
:disabled="isView || scope.row.isDisabled">100</el-checkbox> :disabled="isView || scope.row.isDisabled">100</el-checkbox>
<el-input class="money" <el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val1"
placeholder="请输入数量"
type="number"
size="mini"
v-model="scope.row.val1"
:disabled="isView || scope.row.isDisabled" /> :disabled="isView || scope.row.isDisabled" />
</div> </div>
<div class="line"> <div class="line">
<el-checkbox class="money-check" <el-checkbox class="money-check" v-model="scope.row.check2"
v-model="scope.row.check2"
:disabled="isView || scope.row.isDisabled">50</el-checkbox> :disabled="isView || scope.row.isDisabled">50</el-checkbox>
<el-input class="money" <el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val2"
placeholder="请输入数量"
type="number"
size="mini"
v-model="scope.row.val2"
:disabled="isView || scope.row.isDisabled" /> :disabled="isView || scope.row.isDisabled" />
</div> </div>
<div class="line"> <div class="line">
<el-checkbox class="money-check" <el-checkbox class="money-check" v-model="scope.row.check3"
v-model="scope.row.check3"
:disabled="isView || scope.row.isDisabled">20</el-checkbox> :disabled="isView || scope.row.isDisabled">20</el-checkbox>
<el-input class="money" <el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val3"
placeholder="请输入数量"
type="number"
size="mini"
v-model="scope.row.val3"
:disabled="isView || scope.row.isDisabled" /> :disabled="isView || scope.row.isDisabled" />
</div> </div>
<div class="line"> <div class="line">
<el-checkbox class="money-check" <el-checkbox class="money-check" v-model="scope.row.check4"
v-model="scope.row.check4"
:disabled="isView || scope.row.isDisabled">10</el-checkbox> :disabled="isView || scope.row.isDisabled">10</el-checkbox>
<el-input class="money" <el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val4"
placeholder="请输入数量"
type="number"
size="mini"
v-model="scope.row.val4"
:disabled="isView || scope.row.isDisabled" /> :disabled="isView || scope.row.isDisabled" />
</div> </div>
<div class="line"> <div class="line">
<el-checkbox class="money-check" <el-checkbox class="money-check" v-model="scope.row.check5"
v-model="scope.row.check5"
:disabled="isView || scope.row.isDisabled">5</el-checkbox> :disabled="isView || scope.row.isDisabled">5</el-checkbox>
<el-input class="money" <el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val5"
placeholder="请输入数量"
type="number"
size="mini"
v-model="scope.row.val5"
:disabled="isView || scope.row.isDisabled" /> :disabled="isView || scope.row.isDisabled" />
</div> </div>
<div class="line"> <div class="line">
<el-checkbox class="money-check" <el-checkbox class="money-check" v-model="scope.row.check6"
v-model="scope.row.check6"
:disabled="isView || scope.row.isDisabled">1</el-checkbox> :disabled="isView || scope.row.isDisabled">1</el-checkbox>
<el-input class="money" <el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val6"
placeholder="请输入数量"
type="number"
size="mini"
v-model="scope.row.val6"
:disabled="isView || scope.row.isDisabled" /> :disabled="isView || scope.row.isDisabled" />
</div> </div>
<div class="line"> <div class="line">
<el-checkbox class="money-check" <el-checkbox class="money-check" v-model="scope.row.check7"
v-model="scope.row.check7"
:disabled="isView || scope.row.isDisabled">5</el-checkbox> :disabled="isView || scope.row.isDisabled">5</el-checkbox>
<el-input class="money" <el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val7"
placeholder="请输入数量"
type="number"
size="mini"
v-model="scope.row.val7"
:disabled="isView || scope.row.isDisabled" /> :disabled="isView || scope.row.isDisabled" />
</div> </div>
<div class="line"> <div class="line">
<el-checkbox class="money-check" <el-checkbox class="money-check" v-model="scope.row.check8"
v-model="scope.row.check8"
:disabled="isView || scope.row.isDisabled">1</el-checkbox> :disabled="isView || scope.row.isDisabled">1</el-checkbox>
<el-input class="money" <el-input class="money" placeholder="请输入数量" type="number" size="mini" v-model="scope.row.val8"
placeholder="请输入数量"
type="number"
size="mini"
v-model="scope.row.val8"
:disabled="isView || scope.row.isDisabled" /> :disabled="isView || scope.row.isDisabled" />
</div> </div>
</div> </div>
@ -452,29 +289,18 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" width="300" v-if="!isView">
width="300" <template slot-scope="scope" v-if="scope.row.isSubject">
v-if="!isView"> <el-button v-show="scope.row.isDisabled" size="mini" type="text" @click="handleEdit(scope.row)">编辑
<template slot-scope="scope"
v-if="scope.row.isSubject">
<el-button v-show="scope.row.isDisabled"
size="mini"
type="text"
@click="handleEdit(scope.row)">编辑
</el-button> </el-button>
<el-button v-show="!scope.row.isDisabled" <el-button v-show="!scope.row.isDisabled" size="mini" type="text" @click="handleSave(scope.row)">保存
size="mini"
type="text"
@click="handleSave(scope.row)">保存
</el-button> </el-button>
<!-- <el-button v-show="!scope.row.isDisabled" <!-- <el-button v-show="!scope.row.isDisabled"
size="mini" size="mini"
type="text" type="text"
@click="handleCancel(scope.row, scope.$index)">取消 @click="handleCancel(scope.row, scope.$index)">取消
</el-button> --> </el-button> -->
<el-button v-show="scope.row.isDisabled" <el-button v-show="scope.row.isDisabled" size="mini" type="text"
size="mini"
type="text"
@click="handleDelete(scope.row, scope.$index)">删除 @click="handleDelete(scope.row, scope.$index)">删除
</el-button> </el-button>
</template> </template>
@ -1320,6 +1146,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.content { .content {
position: relative; position: relative;
top: 10px; top: 10px;
@ -1337,6 +1164,7 @@ export default {
.back { .back {
line-height: 3; line-height: 3;
span { span {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
@ -1350,17 +1178,21 @@ export default {
margin-left: 20px; margin-left: 20px;
} }
} }
.cell div { .cell div {
margin: auto; margin: auto;
text-align: center; text-align: center;
} }
.business { .business {
display: flex; display: flex;
align-items: center; align-items: center;
.label { .label {
margin-right: 10px; margin-right: 10px;
} }
} }
// //
.form-con { .form-con {
padding-bottom: 24px; padding-bottom: 24px;
@ -1389,6 +1221,7 @@ export default {
padding-right: 20px; padding-right: 20px;
line-height: 35px; line-height: 35px;
} }
.quill { .quill {
width: calc(100% - 240px); width: calc(100% - 240px);
} }
@ -1418,6 +1251,7 @@ export default {
} }
} }
} }
/deep/.add-tree { /deep/.add-tree {
.exist { .exist {
font-size: 12px; font-size: 12px;
@ -1425,6 +1259,7 @@ export default {
color: #b3b3b3; color: #b3b3b3;
} }
} }
// //
/deep/ ::-webkit-scrollbar { /deep/ ::-webkit-scrollbar {
width: 6px; // width: 6px; //
@ -1460,6 +1295,7 @@ export default {
z-index: 100; z-index: 100;
} }
} }
/deep/.lc-table { /deep/.lc-table {
.el-table__body { .el-table__body {
tr:nth-child(even) .el-checkbox { tr:nth-child(even) .el-checkbox {
@ -1467,17 +1303,20 @@ export default {
} }
} }
} }
@mixin block { @mixin block {
padding: 10px; padding: 10px;
border: 1px solid #e4e7ed; border: 1px solid #e4e7ed;
border-radius: 4px; border-radius: 4px;
} }
.block1 { .block1 {
@include block; @include block;
height: 230px; height: 230px;
background-color: #fff; background-color: #fff;
overflow: auto; overflow: auto;
} }
.block { .block {
@include block; @include block;
min-height: 220px; min-height: 220px;
@ -1503,6 +1342,7 @@ export default {
width: auto; width: auto;
} }
} }
.action { .action {
flex: 1; flex: 1;
text-align: left; text-align: left;
@ -1547,6 +1387,7 @@ export default {
margin-left: 0; margin-left: 0;
} }
} }
&.range { &.range {
/deep/ .el-input { /deep/ .el-input {
width: 80px; width: 80px;
@ -1571,15 +1412,18 @@ export default {
} }
} }
} }
.money-box { .money-box {
.line { .line {
margin: 12px 0 !important; margin: 12px 0 !important;
} }
/deep/.money-check { /deep/.money-check {
width: 80px; width: 80px;
text-align: left; text-align: left;
} }
} }
/deep/.el-dialog__wrapper { /deep/.el-dialog__wrapper {
:hover { :hover {
cursor: pointer; cursor: pointer;

@ -1,25 +1,5 @@
// 引入等比适配插件
const px2rem = require('postcss-px2rem')
// 配置基本大小
const postcss = px2rem({
// 基准大小 baseSize,需要和rem.js中相同
remUnit: 16
})
// 使用等比适配插件
module.exports = { module.exports = {
lintOnSave: true, lintOnSave: true,
css: {
loaderOptions: {
postcss: {
plugins: [
postcss
]
}
}
},
publicPath: process.env.NODE_ENV === "development" ? "./" : "", publicPath: process.env.NODE_ENV === "development" ? "./" : "",
outputDir: 'dist', outputDir: 'dist',
assetsDir: 'static', assetsDir: 'static',

Loading…
Cancel
Save