| | |
| | | <script> |
| | | import Base64 from '../../components/js-base64/base64.js' |
| | | import pickerAddress from '../../js/pickerAddress/pickerAddress.vue' |
| | | import classUtils from "@/js/utils.js" |
| | | import utils from "@/js/utils.js" |
| | | export default { |
| | | modules: { |
| | | Base64, |
| | |
| | | $this.$data.classAttrList = success.result; |
| | | success.result.forEach(async (group, index) => { |
| | | group.attr_list.forEach(async (attr, key) => { |
| | | if (classUtils.attrTypeIsDict(attr.type)) |
| | | if (utils.classUtils.attrTypeIsDict(attr.type)) |
| | | // if (attr.type == "字典-字符串" || attr.type == "字典-整数" ||attr.type == "dict-char" || attr.type == "dict-int") |
| | | { |
| | | await $this.DictItemGetList(attr, key, index, 'mast'); |
| | |
| | | $this.$data.subClassAttrList = success.result; |
| | | success.result.forEach(async (group, index) => { |
| | | group.attr_list.forEach(async (attr, key) => { |
| | | if (classUtils.attrTypeIsDict(attr.type)) { |
| | | if (utils.classUtils.attrTypeIsDict(attr.type)) { |
| | | //if (attr.type == "字典-字符串" || attr.type == "字典-整数" ||attr.type == "dict-char" || attr.type == "dict-int"){ |
| | | await $this.DictItemGetList(attr, key, index, 'sub'); |
| | | } |
| | |
| | | } |
| | | // console.log(ca.dictitem); |
| | | } |
| | | if (classUtils.attrTypeIsDate(ca |
| | | if (utils.classUtils.attrTypeIsDate(ca |
| | | .Type |
| | | )) // if(ca.Type=='日期' || ca.Type=='时间' ||ca.Type=='date' || ca.Type=='datetime') |
| | | { |
| | |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date.day); |
| | | } |
| | | if (classUtils.attrTypeIsObjRefMulti(ca |
| | | if (utils.classUtils.attrTypeIsObjRefMulti(ca |
| | | .Type)) // if(ca.Type=='引用对象(多个)' || ca.Type=='obj-ref-multi'){ |
| | | { |
| | | ca.RelClsList = ca.RelCls; |
| | | ca.Value = '请选择'; |
| | | } |
| | | if (classUtils.attrTypeIsRegion(ca.Type)) //if(ca.Type=='省市区'|| ca.Type=='region') |
| | | if (utils.classUtils.attrTypeIsRegion(ca.Type)) //if(ca.Type=='省市区'|| ca.Type=='region') |
| | | ca.Value = '请选择'; |
| | | if (classUtils.attrTypeIsBool(ca.Type)) //if(ca.Type=='布尔值'|| ca.Type=='bool') |
| | | if (utils.classUtils.attrTypeIsBool(ca.Type)) //if(ca.Type=='布尔值'|| ca.Type=='bool') |
| | | ca.Value = false; |
| | | |
| | | attr.push(ca); |
| | |
| | | } |
| | | } |
| | | } |
| | | if (classUtils.attrTypeIsDate(ca.Type)) //if(ca.Type=='日期' || ca.Type=='时间') |
| | | if (utils.classUtils.attrTypeIsDate(ca.Type)) //if(ca.Type=='日期' || ca.Type=='时间') |
| | | { |
| | | var nowDate = new Date(); |
| | | var date = { |
| | |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date.day); |
| | | } |
| | | if (classUtils.attrTypeIsObjRefMulti(ca.Type)) //if(ca.Type=='引用对象(多个)') |
| | | if (utils.classUtils.attrTypeIsObjRefMulti(ca.Type)) //if(ca.Type=='引用对象(多个)') |
| | | { |
| | | ca.RelClsList = ca.RelCls; |
| | | ca.Value = '请'; |
| | | } |
| | | if (classUtils.attrTypeIsRegion(ca.Type)) //if(ca.Type=='省市区'||ca.Type=='region') |
| | | if (utils.classUtils.attrTypeIsRegion(ca.Type)) //if(ca.Type=='省市区'||ca.Type=='region') |
| | | ca.Value = '请选择'; |
| | | if (classUtils.attrTypeIsBool(ca.Type)) //if(ca.Type=='布尔值'||ca.Type=='bool') |
| | | if (utils.classUtils.attrTypeIsBool(ca.Type)) //if(ca.Type=='布尔值'||ca.Type=='bool') |
| | | ca.Value = false; |
| | | |
| | | attr.push(ca); |
| | |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if (ar.Value == '请选择' || ar.Value == '——请选择——') ar.Value = ''; |
| | | if (classUtils.attrTypeIsDict(ar |
| | | if (utils.classUtils.attrTypeIsDict(ar |
| | | .Type)) //if (ar.Type == '字典' || ar.Type == '字典-字符串' || ar.Type == '字典-整数' ) { |
| | | if (ar.select == true) { //判断下拉是否多选 |
| | | var valStr = ""; |
| | |
| | | for (var j = 0; j < attr |
| | | .length; j++) { |
| | | var ar = attr[j]; |
| | | if (classUtils.attrTypeIsDict( |
| | | if (utils.classUtils.attrTypeIsDict( |
| | | ar.Type |
| | | )) //if(ar.Type=='字典' || ar.Type=='字典-字符串' || ar.Type=='字典-整数') |
| | | req.push({ |
| | |
| | | if (ar.Value == '请选择' || ar |
| | | .Value == '——请选择——') ar.Value = |
| | | ''; |
| | | if (classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (utils.classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (ar.select == |
| | | true) { //判断下拉是否多选 |
| | | var valStr = ""; |
| | |
| | | ca |
| | | .Name |
| | | ) { |
| | | if (classUtils.attrTypeIsDict(ca.Type)) { |
| | | if (utils.classUtils.attrTypeIsDict(ca.Type)) { |
| | | var |
| | | dictItemList = []; |
| | | for ( |
| | |
| | | ] |
| | | .attr |
| | | ) { |
| | | if (classUtils.attrTypeIsDict(attr[j].Type)) { |
| | | if (utils.classUtils.attrTypeIsDict(attr[j].Type)) { |
| | | var |
| | | dictItemList = []; |
| | | for ( |
| | |
| | | ca |
| | | .Name |
| | | ) { |
| | | if (classUtils.attrTypeIsDict(ca.Type)) { |
| | | if (utils.classUtils.attrTypeIsDict(ca.Type)) { |
| | | var |
| | | dictItemList = []; |
| | | for ( |
| | |
| | | ] |
| | | .attr |
| | | ) { |
| | | if (classUtils.attrTypeIsDict(attr[j].Type)) { |
| | | if (utils.classUtils.attrTypeIsDict(attr[j].Type)) { |
| | | var |
| | | dictItemList = []; |
| | | for ( |
| | |
| | | if (ar.Value == '请选择' || ar |
| | | .Value == '——请选择——') ar.Value = |
| | | ''; |
| | | if (classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (utils.classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (ar.select == |
| | | true) { //判断下拉是否多选 |
| | | var valStr = ""; |
| | |
| | | if (ar.Value == '请选择' || ar |
| | | .Value == '——请选择——') ar |
| | | .Value = ''; |
| | | if (classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (utils.classUtils.attrTypeIsDict(ar.Type)) { |
| | | if (ar.select == |
| | | true) { //判断下拉是否多选 |
| | | var valStr = ""; |
| | |
| | | }, |
| | | |
| | | formatAttr(attr) { |
| | | if (classUtils.attrTypeIsObjRefMulti(attr.Type)) //if(ar.Type=='引用对象(多个)') |
| | | if (utils.classUtils.attrTypeIsObjRefMulti(attr.Type)) //if(ar.Type=='引用对象(多个)') |
| | | if (attr.Value == '请') ar.Value = ''; |
| | | if (classUtils.attrTypeIsUser(attr.Type) || classUtils.attrTypeIsProject(attr |
| | | if (utils.classUtils.attrTypeIsUser(attr.Type) || utils.classUtils.attrTypeIsProject(attr |
| | | .Type)) //if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | | return { |
| | | attr: attr.Name, |
| | | value: attr.ValID ? attr.ValID : '' |
| | | }; |
| | | else if (classUtils.attrTypeIsBool(attr.Type)) //if(ar.Type=='布尔值') |
| | | else if (utils.classUtils.attrTypeIsBool(attr.Type)) //if(ar.Type=='布尔值') |
| | | return { |
| | | attr: attr.Name, |
| | | value: attr.Value ? '1' : '0' |