Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
a4b29ee1
Commit
a4b29ee1
authored
Apr 01, 2022
by
lp784568205
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改三级联动
parent
8910fcf7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
11 deletions
+112
-11
src/components/zdryGl/ptCxForm_components.vue
+0
-0
src/views/queryAj.vue
+112
-11
No files found.
src/components/zdryGl/ptCxForm_components.vue
View file @
a4b29ee1
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/views/queryAj.vue
View file @
a4b29ee1
...
...
@@ -303,23 +303,124 @@ export default {
this
.
$set
(
this
.
cxFormData
,
"lasjRqsjJssj"
,
this
.
formatDate
(
new
Date
()));
},
watch
:
{
"cxFormData.xszalxdm"
:
{
handler
(
newName
,
oldName
)
{
debugger
;
if
(
newName
!=
oldName
)
{
console
.
log
(
this
.
cxQueryField
[
3
].
codeOptions
);
//
"cxFormData.xszalxdm": {
//
handler(newName, oldName) {
//
debugger;
//
if (newName != oldName) {
//
console.log(this.cxQueryField[3].codeOptions);
this
.
$set
(
this
.
cxFormData
,
"ajlbdm"
,
newName
.
substring
(
0
,
8
));
// this.$set(this.cxFormData, "ajlbdm", newName.substring(0, 8));
// }
// },
// },
// "cxFormData.xslalxdm": {
// handler(newName, oldName) {
// debugger;
// if (newName != oldName) {
// this.$set(this.cxFormData, "xszalxdm", newName.substring(0, 12));
// }
// },
// },
//监听器中监听表单的值,刷新下拉框的数据
"cxFormData.ajlbCode"
:
{
handler
(
val
,
oldVal
)
{
let
self
=
this
;
//请求接口 4 CODE_GABAJZLB_bz
if
(
val
!==
""
)
{
if
(
oldVal
!=
""
)
{
self
.
$set
(
self
.
cxFormData
,
"ajxzlb"
,
""
);
}
axios
.
get
(
`JsonData/CODE_GABAJZLB_bz.json`
)
.
then
((
res
)
=>
{
self
.
cxQueryField
[
4
].
codeOptions
=
res
.
data
.
rows
.
filter
((
value
)
=>
{
return
value
.
id
.
indexOf
(
val
)
==
0
;
});
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
});
}
else
{
axios
.
get
(
`JsonData/CODE_GABAJZLB_bz.json`
)
.
then
((
res
)
=>
{
self
.
cxQueryField
[
4
].
codeOptions
=
res
.
data
.
rows
;
// self.$set(val, "codeOptions", res.data.rows);
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
});
self
.
$set
(
self
.
cxFormData
,
"ajxzlb"
,
""
);
}
},
deep
:
true
,
},
"cxFormData.xslalxdm"
:
{
handler
(
newName
,
oldName
)
{
debugger
;
if
(
newName
!=
oldName
)
{
this
.
$set
(
this
.
cxFormData
,
"xszalxdm"
,
newName
.
substring
(
0
,
12
));
"cxFormData.ajxzlb"
:
{
handler
(
val
,
oldVal
)
{
let
self
=
this
;
//请求接口 5 CODE_GABAJXZLB_bz
if
(
val
!==
""
)
{
if
(
oldVal
!=
""
)
{
self
.
$set
(
self
.
cxFormData
,
"ajxlb"
,
""
);
}
axios
.
get
(
`JsonData/CODE_GABAJXZLB_bz.json`
)
.
then
((
res
)
=>
{
self
.
cxQueryField
[
5
].
codeOptions
=
res
.
data
.
rows
.
filter
((
value
)
=>
{
return
value
.
id
.
indexOf
(
val
)
==
0
;
});
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
});
axios
.
get
(
`JsonData/CODE_AJLB_bz.json`
)
.
then
((
res
)
=>
{
let
resultObj
=
res
.
data
.
rows
.
find
((
i
)
=>
val
.
indexOf
(
i
.
id
)
==
0
);
if
(
resultObj
)
{
self
.
$set
(
self
.
cxFormData
,
"ajlbCode"
,
resultObj
.
id
);
}
else
{
self
.
$set
(
self
.
cxFormData
,
"ajlbCode"
,
""
);
}
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
});
}
else
{
axios
.
get
(
`JsonData/CODE_GABAJXZLB_bz.json`
)
.
then
((
res
)
=>
{
self
.
cxQueryField
[
5
].
codeOptions
=
res
.
data
.
rows
;
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
});
self
.
$set
(
self
.
cxFormData
,
"ajxlb"
,
""
);
}
},
deep
:
true
,
},
"cxFormData.ajxlb"
:
{
handler
(
val
)
{
let
self
=
this
;
if
(
val
!==
""
)
{
axios
.
get
(
`JsonData/CODE_GABAJZLB_bz.json`
)
.
then
((
res
)
=>
{
let
resultObj
=
res
.
data
.
rows
.
find
((
i
)
=>
val
.
indexOf
(
i
.
id
)
==
0
);
if
(
resultObj
)
{
self
.
$set
(
self
.
cxFormData
,
"ajxzlb"
,
resultObj
.
id
);
}
else
{
self
.
$set
(
self
.
cxFormData
,
"ajxzlb"
,
""
);
}
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
});
}
else
{
}
},
deep
:
true
,
},
},
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment