Commit 6a55d9b4 by WH

Merge remote-tracking branch 'origin/bochk-poc' into bochk-poc

parents 462b8d41 87add234
...@@ -50,6 +50,7 @@ export default { ...@@ -50,6 +50,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -45,6 +45,7 @@ export default { ...@@ -45,6 +45,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData(model, data) { copyValueFromVoData(model, data) {
model.modifySet = []
let keysList = Object.keys(model); let keysList = Object.keys(model);
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -45,6 +45,7 @@ export default { ...@@ -45,6 +45,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -45,6 +45,7 @@ export default { ...@@ -45,6 +45,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -45,6 +45,7 @@ export default { ...@@ -45,6 +45,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -45,6 +45,7 @@ export default { ...@@ -45,6 +45,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
......
...@@ -50,6 +50,7 @@ export default { ...@@ -50,6 +50,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
...@@ -142,6 +143,7 @@ export default { ...@@ -142,6 +143,7 @@ export default {
let res = await Api.post('/service/ptspta/fetch', params); let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.$set(this.model.gidgrp, row.role.toLowerCase(), res.data); this.$set(this.model.gidgrp, row.role.toLowerCase(), res.data);
this.modifySetCollect(row,'brdgrp',this.model)
} }
}, },
// 业务信息=》基本信息=》支出目的 // 业务信息=》基本信息=》支出目的
......
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
// purpos: model.lidgrp.rec.purpos, // purpos: model.lidgrp.rec.purpos,
// revflg: model.lidgrp.rec.revflg, // revflg: model.lidgrp.rec.revflg,
// cnfsta: model.lidgrp.rec.cnfsta, // cnfsta: model.lidgrp.rec.cnfsta,
objinr: model.brdgrp.rec.inr, inr: model.brdgrp.rec.inr,
relgodflg: model.brdgrp.rec.relgodflg, relgodflg: model.brdgrp.rec.relgodflg,
// inr: model.brdgrp.rec.inr, // inr: model.brdgrp.rec.inr,
dscinsflg: model.brdgrp.rec.dscinsflg, dscinsflg: model.brdgrp.rec.dscinsflg,
......
...@@ -54,6 +54,7 @@ export default { ...@@ -54,6 +54,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
...@@ -146,8 +147,18 @@ export default { ...@@ -146,8 +147,18 @@ export default {
let res = await Api.post('/service/ptspta/fetch', params); let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.$set(this.model.brdgrp, row.role.toLowerCase(), res.data); this.$set(this.model.brdgrp, row.role.toLowerCase(), res.data);
this.modifySetCollect(row,'brdgrp',this.model)
} }
}, },
getProperty(str, value) {
let keys = str?.split('.')
for (let key of keys) {
if (value) {
value = value[key]
}
}
return value
},
// 业务信息=》基本信息=》支出目的 // 业务信息=》基本信息=》支出目的
purposChange(key, value) { purposChange(key, value) {
this.handleChangeForm(key, value); this.handleChangeForm(key, value);
......
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) { copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
...@@ -111,12 +112,15 @@ export default { ...@@ -111,12 +112,15 @@ export default {
}, },
// 选中gitopn弹框表格的行数据 // 选中gitopn弹框表格的行数据
async selectGridEtyPromptData(row) { async selectGridEtyPromptData(row) {
let params = { let params = {
...row, ...row,
}; };
let res = await Api.post('/service/ptspta/fetch', params); let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.$set(this.model.lidgrp, row.role.toLowerCase(), res.data); this.$set(this.model.lidgrp, row.role.toLowerCase(), res.data);
this.modifySetCollect(row,'lidgrp',this.model)
} }
}, },
//获取信用证编号 //获取信用证编号
......
...@@ -50,6 +50,7 @@ export default { ...@@ -50,6 +50,7 @@ export default {
}, },
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题 // 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData(model, data) { copyValueFromVoData(model, data) {
model.modifySet = []
let keysList = Object.keys(model) let keysList = Object.keys(model)
keysList.map((key) => { keysList.map((key) => {
if (data[key]) { if (data[key]) {
...@@ -142,6 +143,7 @@ export default { ...@@ -142,6 +143,7 @@ export default {
let res = await Api.post('/service/ptspta/fetch', params); let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.$set(this.model.gidgrp, row.role.toLowerCase(), res.data); this.$set(this.model.gidgrp, row.role.toLowerCase(), res.data);
this.modifySetCollect(row,'gidgrp',this.model)
} }
}, },
// 业务信息=》基本信息=》支出目的 // 业务信息=》基本信息=》支出目的
......
<template> <template>
<el-date-picker v-storeModify :id="id" :class="{'highlight': highlight}" v-model="model" v-bind="attrs" v-on="$listeners" v-bind:disabled="isDisable" :value-format="valueFormat" :format="format"></el-date-picker> <el-date-picker v-storeModify :id="id" :class="{'highlight': highlight,'redClass':red && isDisable}" v-model="model" v-bind="attrs" v-on="$listeners" v-bind:disabled="isDisable" :value-format="valueFormat" :format="format"></el-date-picker>
</template> </template>
<script> <script>
...@@ -7,30 +7,39 @@ export default { ...@@ -7,30 +7,39 @@ export default {
inject: ["root"], inject: ["root"],
directives:{ directives:{
storeModify:{ storeModify:{
bind(el,bind,vnode){ update(el,bind,vnode){
let target = el.querySelector('.el-input__inner') let target = el.querySelector('.el-input__inner')
target.onfocus = (...args)=>{
let _this = vnode.context let _this = vnode.context
let key = vnode.parent.data.model.expression let key = vnode.parent.data.model.expression
let keyArray = key.split('.') let keyArray = key.split('.')
let curKey = keyArray.pop() let curKey = keyArray.pop()
let resultKey = keyArray.join(".") let resultKey = keyArray.join(".")
let deepData = _this.getProperty(resultKey,_this.root) let deepData = _this.getProperty(resultKey,_this.root)
if(deepData.modify){ if(deepData && Array.isArray(deepData.modifySet)){
if(Array.isArray(deepData.modify)){ if(deepData.modifySet.includes(curKey)){
if(deepData.modify.includes(curKey)){ _this.red = true
}
}
target.onfocus = (...args)=>{
if(deepData.modifySet){
if(Array.isArray(deepData.modifySet)){
if(deepData.modifySet.includes(curKey)){
return return
} }
deepData.modify.push(curKey) deepData.modifySet.push(curKey)
} }
} else { } else {
deepData.modify = [curKey] deepData.modifySet = [curKey]
} }
} }
} }
} }
}, },
props: { props: {
red:{
type: Boolean,
default: false
},
value: { value: {
default: '' default: ''
}, },
...@@ -94,8 +103,12 @@ export default { ...@@ -94,8 +103,12 @@ export default {
} }
</script> </script>
<style> <style lang="less" scoped>
.el-input.highlight .el-input__inner{ .el-input.highlight .el-input__inner{
border-color: red; border-color: red;
} }
.redClass /deep/ .el-input__inner{
border-color: red;
}
</style> </style>
\ No newline at end of file
<template> <template>
<el-input v-storeModify :id="id" ref="form-item" v-model="model" v-bind="attrs" v-on="$listeners" v-bind:disabled="isDisable"> <el-input :class="{'redClass':red && isDisplay}" v-storeModify :id="id" ref="form-item" v-model="model" v-bind="attrs" v-on="$listeners" v-bind:disabled="isDisable">
<template v-slot:suffix> <template v-slot:suffix>
<slot name="suffix"></slot> <slot name="suffix"></slot>
</template> </template>
...@@ -23,27 +23,39 @@ export default { ...@@ -23,27 +23,39 @@ export default {
default: undefined default: undefined
} }
}, },
data(){
return {
red:false
}
},
directives:{ directives:{
storeModify:{ storeModify:{
bind(el,bind,vnode){ update(el,bind,vnode){
el.onchange = (...args)=>{
let _this = vnode.context let _this = vnode.context
let key = vnode.parent.data.model.expression let key = vnode.parent.data.model.expression
let keyArray = key.split('.') let keyArray = key.split('.')
let curKey = keyArray.pop() let curKey = keyArray.pop()
let resultKey = keyArray.join(".") let resultKey = keyArray.join(".")
let deepData = _this.getProperty(resultKey,_this.root) let deepData = _this.getProperty(resultKey,_this.root)
if(deepData.modify){ if(deepData && Array.isArray(deepData.modifySet)){
if(Array.isArray(deepData.modify)){ if(deepData.modifySet.includes(curKey)){
if(deepData.modify.includes(curKey)){ _this.red = true
}
}
el.onchange = (...args)=>{
if(deepData.modifySet){
if(Array.isArray(deepData.modifySet)){
if(deepData.modifySet.includes(curKey)){
return return
} }
deepData.modify.push(curKey) deepData.modifySet.push(curKey)
} }
} else { } else {
deepData.modify = [curKey] deepData.modifySet = [curKey]
} }
} }
} }
} }
}, },
...@@ -64,6 +76,11 @@ export default { ...@@ -64,6 +76,11 @@ export default {
return this.mode === 'display' || this.disabled return this.mode === 'display' || this.disabled
} }
}, },
isDisplay: {
get () {
return this.mode === 'display'
}
},
highlight () { highlight () {
return this.$store.state.Status.highlights.indexOf(this.id) !== -1 return this.$store.state.Status.highlights.indexOf(this.id) !== -1
}, },
...@@ -93,13 +110,15 @@ export default { ...@@ -93,13 +110,15 @@ export default {
} }
</script> </script>
<style> <style lang="less" scoped>
/* .el-input.highlight .el-input__inner{ .redClass /deep/ .el-input__inner{
border-color: red; border-color: red;
} }
.el-textarea.highlight .el-textarea__inner {
.redClass /deep/ .el-textarea__inner {
border-color: red; border-color: red;
} }
/*
.el-input.change-light .el-input__inner{ .el-input.change-light .el-input__inner{
border-color: #E6A23C; border-color: #E6A23C;
} }
......
<template> <template>
<el-input <el-input
:id="id" :id="id"
v-storeModify
:class="{'redClass':isDisplay && isDisable}"
ref="form-item" ref="form-item"
class="m-input-currency" class="m-input-currency"
v-model="model" v-model="model"
...@@ -15,6 +17,44 @@ ...@@ -15,6 +17,44 @@
<script> <script>
import BigNumber from "bignumber.js"; import BigNumber from "bignumber.js";
export default { export default {
inject: ["root"],
directives:{
storeModify:{
update(el,bind,vnode){
let _this = vnode.context
let key = vnode.parent.data.model.expression
let keyArray = key.split('.')
let curKey = keyArray.pop()
let resultKey = keyArray.join(".")
let deepData = _this.getProperty(resultKey,_this.root)
if(deepData && Array.isArray(deepData.modifySet)){
if(deepData.modifySet.includes(curKey)){
_this.red = true
}
}
el.onchange = (...args)=>{
console.log("12")
if(deepData.modifySet){
if(Array.isArray(deepData.modifySet)){
if(deepData.modifySet.includes(curKey)){
return
}
deepData.modifySet.push(curKey)
}
} else {
deepData.modifySet = [curKey]
}
}
}
}
},
data(){
return {
red:false
}
},
props: { props: {
value: { value: {
type: [String, Number], type: [String, Number],
...@@ -69,6 +109,11 @@ export default { ...@@ -69,6 +109,11 @@ export default {
get() { get() {
return this.mode === "display" || this.disabled; return this.mode === "display" || this.disabled;
} }
},
isDisplay: {
get () {
return this.mode === 'display'
}
} }
}, },
methods: { methods: {
...@@ -153,6 +198,15 @@ export default { ...@@ -153,6 +198,15 @@ export default {
} }
return this.value; return this.value;
}, },
getProperty(str, value) {
let keys = str?.split('.')
for (let key of keys) {
if (value) {
value = value[key]
}
}
return value
},
formatValue(value) { formatValue(value) {
if (value !== null && value !== undefined && value.toString) { if (value !== null && value !== undefined && value.toString) {
var temp = value var temp = value
...@@ -211,7 +265,11 @@ export default { ...@@ -211,7 +265,11 @@ export default {
}; };
</script> </script>
<style> <style lang="less" scoped>
.redClass /deep/ .el-input__inner{
border-color: red;
}
/* .el-input.highlight .el-input__inner{ /* .el-input.highlight .el-input__inner{
border-color: red; border-color: red;
} */ } */
......
<template> <template>
<el-input-number :id="id" :class="{'highlight': highlight}" ref="form-item" v-model="model" :controls="false" v-bind="$attrs" v-on="$listeners" v-bind:disabled="isDisable"/> <el-input-number :id="id" v-storeModify :class="{'highlight': highlight,'redClass':red && isDisable}" ref="form-item" v-model="model" :controls="false" v-bind="$attrs" v-on="$listeners" v-bind:disabled="isDisable"/>
</template> </template>
<script> <script>
export default { export default {
inject: ["root"],
directives:{
storeModify:{
update(el,bind,vnode){
let _this = vnode.context
let key = vnode.parent.data.model.expression
let keyArray = key.split('.')
let curKey = keyArray.pop()
let resultKey = keyArray.join(".")
let deepData = _this.getProperty(resultKey,_this.root)
if(deepData && Array.isArray(deepData.modifySet)){
if(deepData.modifySet.includes(curKey)){
_this.red = true
}
}
el.onchange = (...args)=>{
if(deepData.modifySet){
if(Array.isArray(deepData.modifySet)){
if(deepData.modifySet.includes(curKey)){
return
}
deepData.modifySet.push(curKey)
}
} else {
deepData.modifySet = [curKey]
}
}
}
}
},
data(){
return {
red:false
}
},
props: { props: {
value: { value: {
type: Number, type: Number,
...@@ -38,14 +75,28 @@ export default { ...@@ -38,14 +75,28 @@ export default {
highlight () { highlight () {
return this.$store.state.Status.highlights.indexOf(this.id) !== -1 return this.$store.state.Status.highlights.indexOf(this.id) !== -1
} }
},
methods:{
getProperty(str, value) {
let keys = str?.split('.')
for (let key of keys) {
if (value) {
value = value[key]
}
}
return value
}
} }
} }
</script> </script>
<style scope> <style lang="less" scoped>
.el-input-number .el-input__inner { .el-input-number .el-input__inner {
text-align: left; text-align: left;
} }
.el-input.highlight .el-input__inner{ .el-input.highlight .el-input__inner{
border-color: red; border-color: red;
} }
.redClass /deep/ .el-input__inner{
border-color: red;
}
</style> </style>
\ No newline at end of file
<template> <template>
<el-select <el-select
:id="id" :id="id"
:class="{'redClass':red && isDisable}"
v-storeModify v-storeModify
v-model="model" v-model="model"
v-bind="$attrs" v-bind="$attrs"
...@@ -38,27 +39,31 @@ export default { ...@@ -38,27 +39,31 @@ export default {
inject: ["root"], inject: ["root"],
directives:{ directives:{
storeModify:{ storeModify:{
bind(el,bind,vnode){ update(el,bind,vnode){
let target = el.querySelector('.el-input') let target = el.querySelector('.el-input')
// 绑定不上change事件,只能绑定上click、sroll,用户点击了下拉框就会记录改该操作
target.addEventListener("click",()=>{
let _this = vnode.context let _this = vnode.context
let key = vnode.parent.data.model.expression let key = vnode.parent.data.model.expression
let keyArray = key.split('.') let keyArray = key.split('.')
let curKey = keyArray.pop() let curKey = keyArray.pop()
let resultKey = keyArray.join(".") let resultKey = keyArray.join(".")
let deepData = _this.getProperty(resultKey,_this.root) let deepData = _this.getProperty(resultKey,_this.root)
if(deepData.modify){ if(deepData && Array.isArray(deepData.modifySet)){
if(Array.isArray(deepData.modify)){ if(deepData.modifySet.includes(curKey)){
if(deepData.modify.includes(curKey)){ _this.red = true
}
}
target.onclick = (...args)=>{
if(deepData.modifySet){
if(Array.isArray(deepData.modifySet)){
if(deepData.modifySet.includes(curKey)){
return return
} }
deepData.modify.push(curKey) deepData.modifySet.push(curKey)
} }
} else { } else {
deepData.modify = [curKey] deepData.modifySet = [curKey]
}
} }
})
} }
} }
}, },
...@@ -93,6 +98,7 @@ export default { ...@@ -93,6 +98,7 @@ export default {
data(){ data(){
return { return {
dbCodeList:[], dbCodeList:[],
red:false
} }
}, },
watch:{ watch:{
...@@ -185,10 +191,11 @@ export default { ...@@ -185,10 +191,11 @@ export default {
}; };
</script> </script>
<style> <style lang="less" scoped>
/* .el-select.highlight .el-input .el-input__inner { .redClass /deep/ .el-input__inner{
border-color: red; border-color: red;
} */ }
.c-highlight-content { .c-highlight-content {
overflow: hidden; overflow: hidden;
} }
......
...@@ -9,5 +9,22 @@ export default { ...@@ -9,5 +9,22 @@ export default {
}); });
return loading; return loading;
}, },
modifySetCollect(row,area,model){
let keyLabel = row.role.toLowerCase()
let extkeyLabel = `${area}.${keyLabel}.pts`
let deepData = this.getProperty(extkeyLabel,model)
if(Array.isArray(deepData.modifySet) && !deepData.modifySet.includes('extkey')){
deepData.modifySet.push('extkey','adrblk')
}
}, },
getProperty(str, value) {
let keys = str?.split('.')
for (let key of keys) {
if (value) {
value = value[key]
}
}
return value
}
}
}; };
...@@ -49,9 +49,9 @@ export const routes = [ ...@@ -49,9 +49,9 @@ export const routes = [
{ {
path: "/", path: "/",
component: Layout, component: Layout,
redirect: "/home", redirect: "/taskList",
children: [ children: [
{ path: 'home', component: () => import('~/views/Home/index1.vue'), name: 'Home', meta: { title: '首页', icon: 'el-icon-s-home', affix: true } }, // { path: 'home', component: () => import('~/views/Home/index1.vue'), name: 'Home', meta: { title: '首页', icon: 'el-icon-s-home', affix: true } },
{ path: 'taskList', component: () => import('~/views/TaskList'), name: 'TaskList', meta: { title: '任务列表', icon: 'el-icon-s-claim', affix: true } }, { path: 'taskList', component: () => import('~/views/TaskList'), name: 'TaskList', meta: { title: '任务列表', icon: 'el-icon-s-claim', affix: true } },
], ],
}, },
......
<template> <template>
<div class="loginContainer"> <div class="loginContainer">
<div id="loginForamWrapper"> <div class="loginWrapper">
<div class="company-desc"> <div class="loginHead">
<div> <div class="logo"></div>
<img src="../../assets/logo.png" style="height: 60px" alt="" /> <div class="line"></div>
</div> </div>
<h2>国际结算系统</h2> <div class="loginBox">
<div class="loginBoxTitle">
<div class="bigTitle">Trade Finance System</div>
<div class="smallTitle">Use a valid login ID and password to gain access to the operation console of TFS.</div>
</div> </div>
<div class="loginBoxForm">
<div id="loginForm"> <div id="loginForm">
<!--div class="en-title">International Trade Financing</div--> <el-form :model="loginForm" status-icon :rules="rules" ref="loginForm" size="small"
<el-form :hide-required-asterisk="true">
:model="loginForm" <el-form-item prop="username" label="Username" style="margin-top: 40px">
status-icon <el-input :placeholder="$t('login.namePlaceholder')" v-model="loginForm.username"></el-input>
:rules="rules"
ref="loginForm"
size="small"
:hide-required-asterisk="true"
>
<el-form-item prop="username" label="用户名" style="margin-top: 50px">
<el-input
prefix-icon="el-icon-user"
:placeholder="$t('login.namePlaceholder')"
v-model="loginForm.username"
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password" label="密码"> <el-form-item prop="password" label="Password">
<el-input <el-input :placeholder="$t('login.pwdPlaceholder')" type="password" v-model="loginForm.password"
prefix-icon="el-icon-lock" autocomplete="off"></el-input>
:placeholder="$t('login.pwdPlaceholder')"
type="password"
v-model="loginForm.password"
autocomplete="off"
></el-input>
</el-form-item> </el-form-item>
<el-button <el-button class="loginClass" type="primary" @click="submitForm('loginForm')">
style="width: 100%; height: 40px; margin: 20px 0 0" LOGIN
type="primary" </el-button>
@click="submitForm('loginForm')" <el-button class="resetClass" type="primary" @click="resetForm('loginForm')">
> Reset
登录<!--{{ $t("login.loginBtn") }}-->
</el-button> </el-button>
</el-form> </el-form>
</div> </div>
<div class="copy-right">
<span>
<span class="copyright-icon">©</span>
2022 新晨公司版权所有
</span>
</div> </div>
</div> </div>
<div class="loginTitle"> <div class="loginRight">COPYRIGHT BOC(HK)2023</div>
<h1 style="color: white; font-size: 40px">国际结算系统</h1>
<span style="color: white; font-size: 25px; font-weight: bold"
>International Settlement System</span
>
</div> </div>
</div> </div>
</template> </template>
...@@ -65,7 +42,7 @@ ...@@ -65,7 +42,7 @@
import Utils from "~/utils"; import Utils from "~/utils";
import { createNamespacedHelpers } from "vuex"; import { createNamespacedHelpers } from "vuex";
import axios from "axios"; import axios from "axios";
import EventService, {LOGIN} from "~/service/EventService"; import EventService, { LOGIN } from "~/service/EventService";
const { mapState, mapMutations, mapActions } = const { mapState, mapMutations, mapActions } =
...@@ -169,91 +146,163 @@ export default { ...@@ -169,91 +146,163 @@ export default {
}; };
</script> </script>
<style scoped> <style lang="less" scoped>
.loginContainer { .loginContainer {
background: #F5F5F5;
flex: 1; flex: 1;
background-image: url("../../assets/login_bg.png"); display: flex;
/* background-size: cover; */ align-items: center;
background-size: 50% 100%; justify-content: center;
background-position-x: 100%;
background-repeat: no-repeat;
} }
.loginContainer .en-title { .loginContainer .loginWrapper {
font-weight: 600; width: 724px;
font-size: 0.4em;
text-align: center;
margin: 10px 0px 20px;
color: #0000005e;
} }
#loginForamWrapper { .loginHead {
width: 20%; width: 724px;
margin-left: 15%;
height: 100%;
background-color: white;
z-index: 2;
position: absolute;
} }
#loginForamWrapper h2 {
font-size: 20px; .loginHead .logo {
text-align: center; width: 269px;
font-family: 宋体; height: 57px;
opacity: 1;
background-image: url("../../assets/banklogo.png");
background-size: cover;
} }
.company-desc {
height: 32%; .loginHead .line {
display: flex; width: 724px;
flex-direction: column; height: 10px;
justify-content: flex-end; opacity: 1;
background-image: url("../../assets/Line.png");
margin-top: 18px;
margin-bottom: 7px;
} }
.company-desc div {
.loginBox {
width: 724px;
height: 360px;
opacity: 1;
background: #FFFFFF;
box-sizing: border-box;
border: 1px solid #E4E4E4;
display: flex; display: flex;
justify-content: center;
align-items: center;
margin-bottom: 15%;
} }
.company-desc h2 {
.loginRight {
font-family: YuGothic-Regular;
font-size: 10px;
font-weight: normal;
line-height: 10px;
text-align: center;
letter-spacing: 0em;
color: #707070;
width: 724px;
margin: 51px auto;
} }
#loginForm {
display: flex; .loginBox .loginBoxTitle {
flex-direction: column; margin-left: 50px;
justify-content: space-between; flex: 1;
height: 34%;
border-top: solid 1px blue;
} }
#loginForm h2 {
.loginBox .loginBoxTitle .smallTitle {
width: 285px;
height: 34px;
opacity: 1;
font-family: 思源黑体;
font-size: 12px;
font-weight: normal;
line-height: normal;
letter-spacing: 0em;
color: #707070; color: #707070;
} }
#loginForm >>> .el-form-item__label {
font-size: 14px; .loginBox .loginBoxTitle .bigTitle {
color: #707070; width: 314px;
height: 29px;
opacity: 1;
font-family: BarlowCondensed-Regular;
font-size: 29px;
font-weight: normal;
line-height: 29px;
letter-spacing: 0.018000000000000002em;
margin-top: 89px;
margin-bottom: 18px;
color: #241513;
} }
#loginForm >>> .el-input--small .el-input__inner {
height: 40px; .loginBox .loginBoxForm {
width: 284px;
height: 300px;
opacity: 1;
background: #F5F5F5;
box-sizing: border-box;
border: 1px solid #E4E4E4;
margin: 29px;
} }
.copy-right {
height: 32%; .loginBox .loginBoxForm #loginForm {
display: flex; padding: 0 35px;
flex-direction: column;
justify-content: flex-end;
text-align: center;
font-size: 0.4em;
color: #858585;
} }
.copy-right p { .loginClass {
margin: 3px 0; width: 97px;
height: 39px;
background: #B31C2A;
font-family: 思源黑体;
font-size: 15px;
font-weight: bold;
line-height: 15px;
letter-spacing: 0em;
color: #FFFFFF;
margin-left: 0px;
margin-right: 11px;
border: none
} }
.loginTitle { .resetClass {
width: 155%; width: 97px;
height: 100%; height: 39px;
display: flex; opacity: 1;
align-items: center;
flex-direction: column; background: #E4E4E4;
position: absolute; font-family: 思源黑体;
top: 15%; font-size: 15px;
z-index: 1; font-weight: bold;
line-height: 15px;
letter-spacing: 0em;
color: #707070;
margin: 0;
border: none
}
#loginForm /deep/ .el-form-item__label {
font-family: 思源黑体;
font-size: 15px;
font-weight: normal;
line-height: 15px;
letter-spacing: 0em;
color: #707070;
}
#loginForm /deep/ .el-input__inner {
border: 1px solid #D2D2D2;
border-radius: 5px;
background: #FFFFFF;
} }
</style> </style>
\ No newline at end of file
<template>
<div class="loginContainer">
<div id="loginForamWrapper">
<div class="company-desc">
<div>
<img src="../../assets/logo.png" style="height: 60px" alt="" />
</div>
<h2>国际结算系统</h2>
</div>
<div id="loginForm">
<!--div class="en-title">International Trade Financing</div-->
<el-form
:model="loginForm"
status-icon
:rules="rules"
ref="loginForm"
size="small"
:hide-required-asterisk="true"
>
<el-form-item prop="username" label="用户名" style="margin-top: 50px">
<el-input
prefix-icon="el-icon-user"
:placeholder="$t('login.namePlaceholder')"
v-model="loginForm.username"
></el-input>
</el-form-item>
<el-form-item prop="password" label="密码">
<el-input
prefix-icon="el-icon-lock"
:placeholder="$t('login.pwdPlaceholder')"
type="password"
v-model="loginForm.password"
autocomplete="off"
></el-input>
</el-form-item>
<el-button
style="width: 100%; height: 40px; margin: 20px 0 0"
type="primary"
@click="submitForm('loginForm')"
>
登录<!--{{ $t("login.loginBtn") }}-->
</el-button>
</el-form>
</div>
<div class="copy-right">
<span>
<span class="copyright-icon">©</span>
2022 新晨公司版权所有
</span>
</div>
</div>
<div class="loginTitle">
<h1 style="color: white; font-size: 40px">国际结算系统</h1>
<span style="color: white; font-size: 25px; font-weight: bold"
>International Settlement System</span
>
</div>
</div>
</template>
<script>
import Utils from "~/utils";
import { createNamespacedHelpers } from "vuex";
import axios from "axios";
import EventService, {LOGIN} from "~/service/EventService";
const { mapState, mapMutations, mapActions } =
createNamespacedHelpers("UserContext");
const { setLoginInfo } = mapMutations(["setLoginInfo"]);
const usrMap = {
ZL: "wdbus",
MBF: "wdrel",
};
export default {
data() {
return {
loginForm: {
password: "1",
username: "ZL",
},
rules: {
username: [{ type: "string", required: true, message: "请填写用户名" }],
password: [{ type: "string", required: true, message: "请填写密码" }],
},
};
},
methods: {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.setLoginInfo({
userId: this.loginForm.username,
token: Utils.generateUUID(),
});
EventService.emit(LOGIN)
// 电证登录
const dzUsr = usrMap[this.loginForm.username === "ZL" ? "ZL" : "MBF"];
const headers = {
userId: dzUsr,
security: true,
terminalType: "WEB",
};
axios
.post(
"/esfeserver/service/login",
{
data: {
dncode: "",
password: "1",
sendcode: "1",
username: dzUsr,
},
},
{ headers }
)
.then((res) => {
const data = res.data;
if (data.retmsg === "success") {
const d = data.data;
window.sessionStorage.setItem("menu", JSON.stringify(d.menu));
window.sessionStorage.setItem("_token_", d.token);
window.sessionStorage.setItem("_nam_", dzUsr);
axios
.post(
"esfeserver/service/office/offp_login",
{},
{ headers: { ...headers, token: d.token } }
)
.then((rs) => {
const rd = rs.data;
if (rd.retmsg === "success") {
const dd = rd.data;
window.sessionStorage.setItem("bchsta_loginsta", "登录");
window.sessionStorage.setItem("syssta_syssta", "日间");
window.sessionStorage.setItem("syssta_online", "开启");
window.sessionStorage.setItem("usrnam", dd.usr_dspnam);
window.sessionStorage.setItem("usg", dd.usr_usg);
window.sessionStorage.setItem(
"syssta_sysdat",
dd.syssta_sysdat
);
window.sessionStorage.setItem(
"bchsta_chkflg",
dd.bchsta_chkflg
);
window.sessionStorage.setItem("bchnam", dd.bch_namcn);
}
});
this.$router.push("/home");
}
});
} else {
console.log("error submit!!");
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
setLoginInfo,
},
};
</script>
<style scoped>
.loginContainer {
flex: 1;
background-image: url("../../assets/login_bg.png");
/* background-size: cover; */
background-size: 50% 100%;
background-position-x: 100%;
background-repeat: no-repeat;
}
.loginContainer .en-title {
font-weight: 600;
font-size: 0.4em;
text-align: center;
margin: 10px 0px 20px;
color: #0000005e;
}
#loginForamWrapper {
width: 20%;
margin-left: 15%;
height: 100%;
background-color: white;
z-index: 2;
position: absolute;
}
#loginForamWrapper h2 {
font-size: 20px;
text-align: center;
font-family: 宋体;
}
.company-desc {
height: 32%;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.company-desc div {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 15%;
}
.company-desc h2 {
}
#loginForm {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 34%;
border-top: solid 1px blue;
}
#loginForm h2 {
color: #707070;
}
#loginForm >>> .el-form-item__label {
font-size: 14px;
color: #707070;
}
#loginForm >>> .el-input--small .el-input__inner {
height: 40px;
}
.copy-right {
height: 32%;
display: flex;
flex-direction: column;
justify-content: flex-end;
text-align: center;
font-size: 0.4em;
color: #858585;
}
.copy-right p {
margin: 3px 0;
}
.loginTitle {
width: 155%;
height: 100%;
display: flex;
align-items: center;
flex-direction: column;
position: absolute;
top: 15%;
z-index: 1;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment