Commit 427aa059 authored by xinzhedeai's avatar xinzhedeai

企业信息 日期开给联动问题处理

parent 500a92bc
...@@ -686,12 +686,8 @@ var reqApis = function(){ ...@@ -686,12 +686,8 @@ var reqApis = function(){
"isTechSme":{'name': '是否科技型中小企业','type':'select'}, "isTechSme":{'name': '是否科技型中小企业','type':'select'},
"techSmeDate":{'name':'最新评选日期'}, "techSmeDate":{'name':'最新评选日期'},
}, },
change: function (val){
var Dict = this.Dict;
Dict.baseInfo.techSmeDate.form = ~~(val === true);
}
}, // inputCombine_1 组合框中的父输入框 }, // inputCombine_1 组合框中的父输入框
"techSmeDate": { 'type': 'date', 'name': '最新评选日期', table:0,form:0, inputCombine_2:'Y',inputCombineArr_2: {}}, "techSmeDate": { 'type': 'date', 'name': '最新评选日期', table:0, mode:7, inputCombine_2:'Y',inputCombineArr_2: {}},
"isHighTech": { 'type': 'select', 'name': '是否高新技术企业', table:0, inputCombine_1:'Y' , inputCombineArr_1: { "isHighTech": { 'type': 'select', 'name': '是否高新技术企业', table:0, inputCombine_1:'Y' , inputCombineArr_1: {
"isHighTech":{'name': '是否高新技术企业','type':'select'}, "isHighTech":{'name': '是否高新技术企业','type':'select'},
......
...@@ -288,41 +288,15 @@ export default { ...@@ -288,41 +288,15 @@ export default {
watch: { watch: {
'form.visible':{ 'form.visible':{
handler(newValue) { handler(newValue) {
console.log('编辑表单模态框显隐11!!!', this.form.item) /**
* 针对form处理逻辑,企业孵化装填字段好用,单独处理。(是否科技型中小也可以,不过为了布局,暂不放在这里面处理)
*/
// console.log('编辑表单模态框显隐11!!!', this.form.item)
const tempArr = [{ const tempArr = [{
key: 'incubationStatus', // 企业孵化状态 key: 'incubationStatus', // 企业孵化状态
subKey: 'graduationDate' // 子元素(随着主元素值改变而显隐处理) subKey: 'graduationDate' // 子元素(随着主元素值改变而显隐处理)
},{ }
key: 'isHighGrowthInnovative', // 主元素
subKey: 'highGrowthInnovativeDate' // 子元素(随着主元素值改变而显隐处理)
},
{
key: 'isHighTech',
subKey: 'highTechDate'
},
{
key: 'isAdvancedTechService',
subKey: 'advancedTechServiceDate'
},
{
key: 'isSpecializedSpecialEnterprises',
subKey: 'specializedSpecialEnterprisesDate'
},
{
key: 'isTechSme',
subKey: 'techSmeDate'
},
{
key: 'isLittleGiant',
subKey: 'littleGiantDate'
},
{
key: 'isGazelle',
subKey: 'gazelleDate'
}
] ]
tempArr.forEach((item, index)=>{ tempArr.forEach((item, index)=>{
if( this.form.item[item.key]){ // 根据下拉列表获取当前对应的父下拉框的值 if( this.form.item[item.key]){ // 根据下拉列表获取当前对应的父下拉框的值
...@@ -331,117 +305,135 @@ export default { ...@@ -331,117 +305,135 @@ export default {
this.Dict.baseInfo[item.subKey].form = 0 this.Dict.baseInfo[item.subKey].form = 0
} }
}) })
setTimeout(()=>{ // 用于详情弹窗显隐处理
[{
key: 'isHighGrowthInnovative', // 主元素
subKey: 'highGrowthInnovativeDate' // 子元素(随着主元素值改变而显隐处理)
},
{
key: 'isHighTech',
subKey: 'highTechDate'
},
{
key: 'isTechSme',
subKey: 'techSmeDate'
},
{
key: 'isAdvancedTechService',
subKey: 'advancedTechServiceDate'
},
{
key: 'isSpecializedSpecialEnterprises',
subKey: 'specializedSpecialEnterprisesDate'
},
{
key: 'isLittleGiant',
subKey: 'littleGiantDate'
},
{
key: 'isGazelle',
subKey: 'gazelleDate'
}
].forEach((item, index)=>{
this.toggleDateElement(item.subKey, this.form.item[item.key]);
})
},1000)
}, },
immediate: true // 立即调用处理函数 immediate: true // 立即调用处理函数
}, },
// 'basicActv':{ // 'basicActv':{
// handler(newValue) { // handler(newValue) {
// // 针对联动输入框显隐设置 // // 针对联动输入框显隐设置
// console.log('模态框显隐!!!', this.Dict) // console.log('模态框显隐!!!', this.Dict)
// setTimeout(()=>{ // 用于详情弹窗显隐处理 // setTimeout(()=>{ // 用于详情弹窗显隐处理
// [{ // [{
// key: 'isHighGrowthInnovative', // 主元素 // key: 'isHighGrowthInnovative', // 主元素
// subKey: 'highGrowthInnovativeDate' // 子元素(随着主元素值改变而显隐处理) // subKey: 'highGrowthInnovativeDate' // 子元素(随着主元素值改变而显隐处理)
// }, // },
// { // {
// key: 'isHighTech', // key: 'isHighTech',
// subKey: 'highTechDate' // subKey: 'highTechDate'
// }, // },
// { // {
// key: 'isAdvancedTechService', // key: 'isAdvancedTechService',
// subKey: 'advancedTechServiceDate' // subKey: 'advancedTechServiceDate'
// }, // },
// { // {
// key: 'isSpecializedSpecialEnterprises', // key: 'isSpecializedSpecialEnterprises',
// subKey: 'specializedSpecialEnterprisesDate' // subKey: 'specializedSpecialEnterprisesDate'
// }, // },
// { // {
// key: 'isTechSme', // key: 'isLittleGiant',
// subKey: 'techSmeDate' // subKey: 'littleGiantDate'
// }, // },
// { // {
// key: 'isLittleGiant', // key: 'isGazelle',
// subKey: 'littleGiantDate' // subKey: 'gazelleDate'
// }, // }
// {
// key: 'isGazelle',
// subKey: 'gazelleDate'
// }
// ].forEach((item, index)=>{ // ].forEach((item, index)=>{
// this.toggleDateElement(item.subKey, this.catchItem[item.key]); // this.toggleDateElement(item.subKey, this.catchItem[item.key]);
// }) // })
// // this.toggleDateElement("highGrowthInnovativeDate", this.form.item.isHighGrowthInnovative); // // this.toggleDateElement("highGrowthInnovativeDate", this.form.item.isHighGrowthInnovative);
// },1000) // },1000)
// }, // },
// immediate: true // 立即调用处理函数 // immediate: true // 立即调用处理函数
// }, // },
// // "form.item.isHighGrowthInnovative"(newVal, oldVal) { "form.item.isHighGrowthInnovative": {
// // this.toggleDateElement("highGrowthInnovativeDate"); handler(newValue) {
// // }, this.toggleDateElement("highGrowthInnovativeDate", newValue);
// "form.item.isHighGrowthInnovative": { },
// handler(newValue) { immediate: true // 立即调用处理函数
// this.toggleDateElement("highGrowthInnovativeDate", newValue); },
// }, "form.item.isHighTech": {
// immediate: true // 立即调用处理函数 handler(newValue) {
// }, this.toggleDateElement("highTechDate", newValue);
// // "form.item.isHighTech"(newVal, oldVal) { },
// // this.toggleDateElement("highTechDate"); immediate: true, // 立即调用处理函数
// // }, deep: true,
// "form.item.isHighTech": { },
// handler(newValue) { "form.item.isAdvancedTechService": {
// this.toggleDateElement("highTechDate", newValue); handler(newValue) {
// }, this.toggleDateElement("advancedTechServiceDate", newValue);
// immediate: true // 立即调用处理函数 },
// }, immediate: true // 立即调用处理函数
// "form.item.isAdvancedTechService": { },
// handler(newValue) { "form.item.isSpecializedSpecialEnterprises": {
// this.toggleDateElement("advancedTechServiceDate", newValue); handler(newValue) {
// }, this.toggleDateElement("specializedSpecialEnterprisesDate", newValue);
// immediate: true // 立即调用处理函数 },
// }, immediate: true // 立即调用处理函数
// // "form.item.isAdvancedTechService"(newVal, oldVal) { },
// // this.toggleDateElement("advancedTechServiceDate"); "form.item.isTechSme": {
// // }, handler(newValue) {
// "form.item.isSpecializedSpecialEnterprises": { this.toggleDateElement("techSmeDate", newValue);
// handler(newValue) { },
// this.toggleDateElement("specializedSpecialEnterprisesDate", newValue); immediate: true // 立即调用处理函数
// }, },
// immediate: true // 立即调用处理函数
// }, "form.item.isLittleGiant": {
// // "form.item.isSpecializedSpecialEnterprises"(newVal, oldVal) { handler(newValue) {
// // this.toggleDateElement("specializedSpecialEnterprisesDate"); this.toggleDateElement("littleGiantDate", newValue);
// // }, },
// "form.item.isTechSme": { immediate: true // 立即调用处理函数
// handler(newValue) { },
// this.toggleDateElement("techSmeDate", newValue);
// }, "form.item.isGazelle": {
// immediate: true // 立即调用处理函数 handler(newValue) {
// }, this.toggleDateElement("gazelleDate", newValue);
// // "form.item.isTechSme"(newVal, oldVal) { },
// // this.toggleDateElement("techSmeDate"); immediate: true // 立即调用处理函数
// // }, },
// "form.item.isLittleGiant": {
// handler(newValue) {
// this.toggleDateElement("littleGiantDate", newValue);
// },
// immediate: true // 立即调用处理函数
// },
// // "form.item.isLittleGiant"(newVal, oldVal) {
// // this.toggleDateElement("littleGiantDate");
// // },
// "form.item.isGazelle": {
// handler(newValue) {
// this.toggleDateElement("gazelleDate", newValue);
// },
// immediate: true // 立即调用处理函数
// },
// // "form.item.isGazelle"(newVal, oldVal) {
// // this.toggleDateElement("gazelleDate");
// // },
}, },
methods: { methods: {
beforeUpload(file) { beforeUpload(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