Commit 4f0a5899 by yangxiaolei

快照对比功能版本1.0

parent 6a21666e
......@@ -50,6 +50,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -45,6 +45,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData(model, data) {
model.modifySet = []
let keysList = Object.keys(model);
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -49,6 +49,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -49,6 +49,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -49,6 +49,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -49,6 +49,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -49,6 +49,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -45,6 +45,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -40,6 +40,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -45,6 +45,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -45,6 +45,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -40,6 +40,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -46,6 +46,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -45,6 +45,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -49,6 +49,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -49,6 +49,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -49,6 +49,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......
......@@ -40,6 +40,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......@@ -97,6 +98,7 @@ export default {
},
// 获取弹框表格数据
async queryGridEtyPromptDialogData(type, ptytyp) {
console.log("type=>",type)
let params = {
userId: window.sessionStorage.userId || 'ZL',
ptytyp: ptytyp,
......@@ -111,13 +113,36 @@ export default {
},
// 选中gitopn弹框表格的行数据
async selectGridEtyPromptData(row) {
let params = {
...row,
};
let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) {
this.$set(this.model.lidgrp, row.role.toLowerCase(), res.data);
let keyLabel = row.role.toLowerCase()
let extkeyLabel = `lidgrp.${keyLabel}.pts`
let deepData = this.getProperty(extkeyLabel,this.model)
console.log("deepData=>",deepData)
console.log("deepData1=>",deepData.modifySet)
if(Array.isArray(deepData.modifySet) && !deepData.modifySet.includes('extkey')){
deepData.modifySet.push('extkey','adrblk')
}
console.log("deepData2=>",deepData.modifySet)
}
},
getProperty(str, value) {
let keys = str?.split('.')
for (let key of keys) {
if (value) {
value = value[key]
}
}
return value
},
//获取信用证编号
async onLitpButgetref() {
......
<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>
<script>
......@@ -7,30 +7,39 @@ export default {
inject: ["root"],
directives:{
storeModify:{
bind(el,bind,vnode){
update(el,bind,vnode){
let target = el.querySelector('.el-input__inner')
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
}
}
target.onfocus = (...args)=>{
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.modify){
if(Array.isArray(deepData.modify)){
if(deepData.modify.includes(curKey)){
if(deepData.modifySet){
if(Array.isArray(deepData.modifySet)){
if(deepData.modifySet.includes(curKey)){
return
}
deepData.modify.push(curKey)
deepData.modifySet.push(curKey)
}
} else {
deepData.modify = [curKey]
deepData.modifySet = [curKey]
}
}
}
}
},
props: {
red:{
type: Boolean,
default: false
},
value: {
default: ''
},
......@@ -94,8 +103,12 @@ export default {
}
</script>
<style>
<style lang="less" scoped>
.el-input.highlight .el-input__inner{
border-color: red;
}
.redClass /deep/ .el-input__inner{
border-color: red;
}
</style>
\ No newline at end of file
<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 && isDisable}" v-storeModify :id="id" ref="form-item" v-model="model" v-bind="attrs" v-on="$listeners" v-bind:disabled="isDisable">
<template v-slot:suffix>
<slot name="suffix"></slot>
</template>
......@@ -23,27 +23,39 @@ export default {
default: undefined
}
},
data(){
return {
red:false
}
},
directives:{
storeModify:{
bind(el,bind,vnode){
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)=>{
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.modify){
if(Array.isArray(deepData.modify)){
if(deepData.modify.includes(curKey)){
if(deepData.modifySet){
if(Array.isArray(deepData.modifySet)){
if(deepData.modifySet.includes(curKey)){
return
}
deepData.modify.push(curKey)
deepData.modifySet.push(curKey)
}
} else {
deepData.modify = [curKey]
deepData.modifySet = [curKey]
}
}
}
}
},
......@@ -93,13 +105,15 @@ export default {
}
</script>
<style>
/* .el-input.highlight .el-input__inner{
<style lang="less" scoped>
.redClass /deep/ .el-input__inner{
border-color: red;
}
.el-textarea.highlight .el-textarea__inner {
.redClass /deep/ .el-textarea__inner {
border-color: red;
}
/*
.el-input.change-light .el-input__inner{
border-color: #E6A23C;
}
......
<template>
<el-select
:id="id"
:class="{'redClass':red && isDisable}"
v-storeModify
v-model="model"
v-bind="$attrs"
......@@ -38,27 +39,31 @@ export default {
inject: ["root"],
directives:{
storeModify:{
bind(el,bind,vnode){
update(el,bind,vnode){
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 keyArray = key.split('.')
let curKey = keyArray.pop()
let resultKey = keyArray.join(".")
let deepData = _this.getProperty(resultKey,_this.root)
if(deepData.modify){
if(Array.isArray(deepData.modify)){
if(deepData.modify.includes(curKey)){
if(deepData && Array.isArray(deepData.modifySet)){
if(deepData.modifySet.includes(curKey)){
_this.red = true
}
}
target.onclick = (...args)=>{
if(deepData.modifySet){
if(Array.isArray(deepData.modifySet)){
if(deepData.modifySet.includes(curKey)){
return
}
deepData.modify.push(curKey)
deepData.modifySet.push(curKey)
}
} else {
deepData.modify = [curKey]
deepData.modifySet = [curKey]
}
})
}
}
}
},
......@@ -93,6 +98,7 @@ export default {
data(){
return {
dbCodeList:[],
red:false
}
},
watch:{
......@@ -185,10 +191,11 @@ export default {
};
</script>
<style>
/* .el-select.highlight .el-input .el-input__inner {
<style lang="less" scoped>
.redClass /deep/ .el-input__inner{
border-color: red;
} */
}
.c-highlight-content {
overflow: hidden;
}
......
......@@ -49,9 +49,9 @@ export const routes = [
{
path: "/",
component: Layout,
redirect: "/home",
redirect: "/taskList",
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 } },
],
},
......
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