feat: 标准库
This commit is contained in:
@@ -1859,6 +1859,9 @@
|
|||||||
}else if(this.fileType === 'ca'){
|
}else if(this.fileType === 'ca'){
|
||||||
this.form.ca = response.data.id;
|
this.form.ca = response.data.id;
|
||||||
this.form.caName = response.data.name;
|
this.form.caName = response.data.name;
|
||||||
|
}else if(this.fileType === 'zbjbd'){
|
||||||
|
this.form.zbjbd = response.data.id;
|
||||||
|
this.form.zbjbdName = response.data.name;
|
||||||
}
|
}
|
||||||
this.$message({
|
this.$message({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
|
|||||||
@@ -1745,22 +1745,26 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
popoverHideBusVs (checkedIds, checkedData) {
|
popoverHideBusVs (checkedIds, checkedData) {
|
||||||
this.sarStandardsInfoEO.CYCVPPSBM = checkedData.code
|
if(checkedData){
|
||||||
this.sarStandardsInfoEO.CYCVPPSCN = checkedData.chineseName
|
this.sarStandardsInfoEO.CYCVPPSBM = checkedData.code
|
||||||
console.log(checkedData)
|
this.sarStandardsInfoEO.CYCVPPSCN = checkedData.chineseName
|
||||||
console.log(this.sarStandardsInfoEO.CYCVPPSBM)
|
this.$forceUpdate()
|
||||||
console.log(this.sarStandardsInfoEO.CYCVPPSCN)
|
}
|
||||||
this.$forceUpdate()
|
|
||||||
},
|
},
|
||||||
popoverHideCarVs (checkedIds, checkedData) {
|
popoverHideCarVs (checkedIds, checkedData) {
|
||||||
this.sarStandardsInfoEO.KCCVPPSBM = checkedData.code
|
if(checkedData){
|
||||||
this.sarStandardsInfoEO.KCCVPPSCN = checkedData.chineseName
|
this.sarStandardsInfoEO.KCCVPPSBM = checkedData.code
|
||||||
this.$forceUpdate()
|
this.sarStandardsInfoEO.KCCVPPSCN = checkedData.chineseName
|
||||||
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
popoverHideModel (checkedIds, checkedData) {
|
popoverHideModel (checkedIds, checkedData) {
|
||||||
this.sarStandardsInfoEO.DYBXH = checkedData.model
|
if(checkedData){
|
||||||
this.sarStandardsInfoEO.DYMC = checkedData.name
|
this.sarStandardsInfoEO.DYBXH = checkedData.model
|
||||||
this.$forceUpdate()
|
this.sarStandardsInfoEO.DYMC = checkedData.name
|
||||||
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
busVsFunc(){
|
busVsFunc(){
|
||||||
this.$http.get('sarVppsTree/list', '', {
|
this.$http.get('sarVppsTree/list', '', {
|
||||||
@@ -1777,7 +1781,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
popoverHide (checkedIds, checkedData) {
|
popoverHide (checkedIds, checkedData) {
|
||||||
this.sarStandardsInfoEO.standSystem = checkedData.id
|
if(checkedData){
|
||||||
|
this.sarStandardsInfoEO.standSystem = checkedData.id
|
||||||
|
}
|
||||||
},
|
},
|
||||||
closeModal () {
|
closeModal () {
|
||||||
this.productModal = false
|
this.productModal = false
|
||||||
@@ -2013,7 +2019,8 @@ export default {
|
|||||||
Promise.all([this.queryDisplayLocation()]).then((values) => {
|
Promise.all([this.queryDisplayLocation()]).then((values) => {
|
||||||
const [displayLocation] = values
|
const [displayLocation] = values
|
||||||
const formFieldList = this.formFieldList
|
const formFieldList = this.formFieldList
|
||||||
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
|
console.log(formFieldList)
|
||||||
|
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
|
||||||
if(this.sarStandardsInfoEO.standSystem){
|
if(this.sarStandardsInfoEO.standSystem){
|
||||||
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
|
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
|
||||||
}
|
}
|
||||||
@@ -2783,6 +2790,7 @@ export default {
|
|||||||
// 验证标准号是否唯一
|
// 验证标准号是否唯一
|
||||||
this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
|
this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
debugger
|
||||||
// 时间格式修改
|
// 时间格式修改
|
||||||
let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
|
let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
|
||||||
console.log(nowstandinfo)
|
console.log(nowstandinfo)
|
||||||
|
|||||||
@@ -425,14 +425,14 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<custom-date-pick-with-text2
|
<custom-date-pick
|
||||||
:config="{
|
:config="{
|
||||||
attrName: '发布日期',
|
attrName: '发布日期',
|
||||||
attrField: 'issueTime'
|
attrField: 'issueTime'
|
||||||
}"
|
}"
|
||||||
v-model="sarStandardsInfoEO.issueTime"
|
v-model="sarStandardsInfoEO.issueTime"
|
||||||
:disabled="formdisableflag"
|
:disabled="formdisableflag"
|
||||||
></custom-date-pick-with-text2>
|
></custom-date-pick>
|
||||||
<!--</el-form-item>-->
|
<!--</el-form-item>-->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
prop="isRelateAccess"
|
prop="isRelateAccess"
|
||||||
@@ -475,12 +475,12 @@
|
|||||||
></custom-SVPPS>
|
></custom-SVPPS>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="field.attrField === 'XCXSSRQ' || field.attrField === 'ZCCSSRQ'">
|
<template v-else-if="field.attrField === 'XCXSSRQ' || field.attrField === 'ZCCSSRQ'">
|
||||||
<custom-date-pick-with-text
|
<custom-date-pick
|
||||||
:key="field.attrField"
|
:key="field.attrField"
|
||||||
:config="field"
|
:config="field"
|
||||||
v-model="sarStandardsInfoEO[field.attrField]"
|
v-model="sarStandardsInfoEO[field.attrField]"
|
||||||
:disabled="formdisableflag"
|
:disabled="formdisableflag"
|
||||||
></custom-date-pick-with-text>
|
></custom-date-pick>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="field.attrType === 'DATE_PIC_OPTS'">
|
<template v-else-if="field.attrType === 'DATE_PIC_OPTS'">
|
||||||
<custom-date-pick-group
|
<custom-date-pick-group
|
||||||
@@ -501,6 +501,75 @@
|
|||||||
:data-source="field.attrField === 'CBBH'"
|
:data-source="field.attrField === 'CBBH'"
|
||||||
></custom-input-for-standards>
|
></custom-input-for-standards>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="field.attrField === 'CYCVPPSBM'">
|
||||||
|
<el-form-item
|
||||||
|
prop="CYCVPPSBM"
|
||||||
|
label-width="150px"
|
||||||
|
class="add-form-item"
|
||||||
|
>
|
||||||
|
<template slot="label">乘用车VPPS编码</template>
|
||||||
|
<tree-select
|
||||||
|
:disabled="false"
|
||||||
|
width = "340"
|
||||||
|
:data="busVppsOptions"
|
||||||
|
:defaultProps="defaultCodeProps" :checkedKeys="defaultCheckedKeys1"
|
||||||
|
:nodeKey="nodeKeyCode" @popoverHide="popoverHideBusVs"></tree-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="field.attrField === 'KCCVPPSBM'">
|
||||||
|
<el-form-item
|
||||||
|
prop="KCCVPPSBM"
|
||||||
|
label-width="150px"
|
||||||
|
class="add-form-item"
|
||||||
|
>
|
||||||
|
<template slot="label">卡车VPPS编码</template>
|
||||||
|
<tree-select
|
||||||
|
:disabled="false"
|
||||||
|
width = "340"
|
||||||
|
:data="busVppsOptions"
|
||||||
|
:defaultProps="defaultCodeProps" :checkedKeys="defaultCheckedKeys2"
|
||||||
|
:nodeKey="nodeKeyCode" @popoverHide="popoverHideCarVs"></tree-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="field.attrField === 'DYBXH'">
|
||||||
|
<el-form-item
|
||||||
|
prop="DYBXH"
|
||||||
|
label-width="150px"
|
||||||
|
class="add-form-item"
|
||||||
|
>
|
||||||
|
<template slot="label">模块结构单元变型号</template>
|
||||||
|
<tree-select
|
||||||
|
width = "340"
|
||||||
|
:disabled="false"
|
||||||
|
:data="modelOptions"
|
||||||
|
:defaultProps="defaultModelProps" :checkedKeys="defaultCheckedKeys3"
|
||||||
|
:nodeKey="nodeKeyModel" @popoverHide="popoverHideModel"></tree-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="field.attrField === 'CYCVPPSCN'">
|
||||||
|
<el-form-item label="关联模块--乘用车vpps中文名称" label-width="150px" prop="CYCVPPSCN" class="add-form-item">
|
||||||
|
<el-input
|
||||||
|
v-model="sarStandardsInfoEO.CYCVPPSCN" disabled
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="field.attrField === 'KCCVPPSCN'">
|
||||||
|
<el-form-item label="关联模块--卡车vpps中文名称" label-width="150px" prop="KCCVPPSCN" class="add-form-item">
|
||||||
|
<el-input
|
||||||
|
v-model="sarStandardsInfoEO.KCCVPPSCN" disabled
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="field.attrField === 'DYMC'">
|
||||||
|
<el-form-item label="模块结构单元名称" label-width="150px" prop="DYMC" class="add-form-item">
|
||||||
|
<el-input
|
||||||
|
v-model="sarStandardsInfoEO.DYMC" disabled
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<custom-input
|
<custom-input
|
||||||
:key="field.attrField"
|
:key="field.attrField"
|
||||||
@@ -1067,8 +1136,22 @@ export default {
|
|||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'menuName'
|
label: 'menuName'
|
||||||
},
|
},
|
||||||
|
nodeKeyCode: 'code',
|
||||||
|
nodeKeyModel: 'model',
|
||||||
nodeKey: 'id',
|
nodeKey: 'id',
|
||||||
defaultCheckedKeys: [],
|
defaultCheckedKeys1: [],
|
||||||
|
defaultCheckedKeys2: [],
|
||||||
|
defaultCheckedKeys3: [],
|
||||||
|
defaultCodeProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'code'
|
||||||
|
},
|
||||||
|
defaultModelProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'model'
|
||||||
|
},
|
||||||
|
busVppsOptions: [], // 车系体系架构
|
||||||
|
modelOptions: [], // 模块体系架构
|
||||||
productModal: false, // 模态框是否打开
|
productModal: false, // 模态框是否打开
|
||||||
modalType: '',
|
modalType: '',
|
||||||
productTitle: '', // 模态框标题
|
productTitle: '', // 模态框标题
|
||||||
@@ -1341,7 +1424,13 @@ export default {
|
|||||||
sentScreenFileFeedback: '',
|
sentScreenFileFeedback: '',
|
||||||
approvalFileTime: '',
|
approvalFileTime: '',
|
||||||
approvalFileFeedback: '',
|
approvalFileFeedback: '',
|
||||||
certPutTimeList: []
|
certPutTimeList: [],
|
||||||
|
CYCVPPSBM: '',
|
||||||
|
CYCVPPSCN: '',
|
||||||
|
KCCVPPSBM: '',
|
||||||
|
KCCVPPSCN: '',
|
||||||
|
DYBXH: '',
|
||||||
|
DYMC: '',
|
||||||
}, // 标准新增过程中用到的对象
|
}, // 标准新增过程中用到的对象
|
||||||
currentFileList: '', // 当前操作的是哪个FormItem的上传
|
currentFileList: '', // 当前操作的是哪个FormItem的上传
|
||||||
isList: [
|
isList: [
|
||||||
@@ -1648,11 +1737,46 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
popoverHideBusVs (checkedIds, checkedData) {
|
||||||
|
if(checkedData){
|
||||||
|
this.sarStandardsInfoEO.CYCVPPSBM = checkedData.code
|
||||||
|
this.sarStandardsInfoEO.CYCVPPSCN = checkedData.chineseName
|
||||||
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
popoverHideCarVs (checkedIds, checkedData) {
|
||||||
|
if(checkedData){
|
||||||
|
this.sarStandardsInfoEO.KCCVPPSBM = checkedData.code
|
||||||
|
this.sarStandardsInfoEO.KCCVPPSCN = checkedData.chineseName
|
||||||
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
popoverHideModel (checkedIds, checkedData) {
|
||||||
|
if(checkedData){
|
||||||
|
this.sarStandardsInfoEO.DYBXH = checkedData.model
|
||||||
|
this.sarStandardsInfoEO.DYMC = checkedData.name
|
||||||
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
busVsFunc(){
|
||||||
|
this.$http.get('sarVppsTree/list', '', {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
this.busVppsOptions = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
modelFunc(){
|
||||||
|
this.$http.get('sarModelTree/list', '', {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
this.modelOptions = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
popoverHide (checkedIds, checkedData) {
|
popoverHide (checkedIds, checkedData) {
|
||||||
console.log(checkedIds);
|
if(checkedData){
|
||||||
console.log(checkedData);
|
this.sarStandardsInfoEO.standSystem = checkedData.id
|
||||||
this.sarStandardsInfoEO.standSystem = checkedData.id
|
}
|
||||||
console.log(this.sarStandardsInfoEO.standSystem);
|
|
||||||
},
|
},
|
||||||
closeModal () {
|
closeModal () {
|
||||||
this.productModal = false
|
this.productModal = false
|
||||||
@@ -1854,12 +1978,12 @@ export default {
|
|||||||
this.addOrUPdateFlag = 2
|
this.addOrUPdateFlag = 2
|
||||||
this.modalshowtitle = '编辑海外标准'
|
this.modalshowtitle = '编辑海外标准'
|
||||||
this.modalshowflag = true
|
this.modalshowflag = true
|
||||||
|
|
||||||
this.resolveFormFieldList(item.isRelateAccess)
|
this.resolveFormFieldList(item.isRelateAccess)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
Promise.all([this.queryDisplayLocation()]).then((values) => {
|
Promise.all([this.queryDisplayLocation()]).then((values) => {
|
||||||
const [displayLocation] = values
|
const [displayLocation] = values
|
||||||
const formFieldList = this.formFieldList
|
const formFieldList = this.formFieldList
|
||||||
|
console.log(formFieldList)
|
||||||
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
|
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
|
||||||
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
|
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
|
||||||
this.sarStandardsInfoEO.standSort = item.standSort
|
this.sarStandardsInfoEO.standSort = item.standSort
|
||||||
@@ -1885,6 +2009,15 @@ export default {
|
|||||||
if (value && field.attrType === 'DATE_PICKER') {
|
if (value && field.attrType === 'DATE_PICKER') {
|
||||||
value = this.$moment(value).format('YYYY-MM-DD')
|
value = this.$moment(value).format('YYYY-MM-DD')
|
||||||
}
|
}
|
||||||
|
if(field.attrField === 'CYCVPPSBM'){
|
||||||
|
this.defaultCheckedKeys1 = [value]
|
||||||
|
}
|
||||||
|
if(field.attrField === 'KCCVPPSBM'){
|
||||||
|
this.defaultCheckedKeys2 = [value]
|
||||||
|
}
|
||||||
|
if(field.attrField === 'DYBXH'){
|
||||||
|
this.defaultCheckedKeys3 = [value]
|
||||||
|
}
|
||||||
field['value'] = value
|
field['value'] = value
|
||||||
// 追加用户名称和部门名称
|
// 追加用户名称和部门名称
|
||||||
if (field.selVal === 'ROLELIST' || field.selVal === 'ORGLIST' || field.selVal === 'USERLIST' || field.attrField === 'SVPPS' || field.attrField === 'XMPGJS') {
|
if (field.selVal === 'ROLELIST' || field.selVal === 'ORGLIST' || field.selVal === 'USERLIST' || field.attrField === 'SVPPS' || field.attrField === 'XMPGJS') {
|
||||||
@@ -2516,81 +2649,75 @@ export default {
|
|||||||
this.$message.success('保存成功')
|
this.$message.success('保存成功')
|
||||||
},
|
},
|
||||||
// 保存或修改标准
|
// 保存或修改标准
|
||||||
saveOrUpdateStands () {
|
saveOrUpdateStands () {
|
||||||
this.$refs['sarStandardsInfoForm'].validate((valid) => {
|
this.isSubmit = true
|
||||||
if (valid) {
|
this.$refs['sarStandardsInfoForm'].validate((valid) => {
|
||||||
// 验证标准号是否唯一
|
if (valid) {
|
||||||
this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
|
// 验证标准号是否唯一
|
||||||
if (flag) {
|
this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
|
||||||
// 时间格式修改
|
if (flag) {
|
||||||
let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
|
debugger
|
||||||
// if (nowstandinfo.issueTime != null && nowstandinfo.issueTime !== '') {
|
// 时间格式修改
|
||||||
// nowstandinfo.issueTime = this.$moment(this.sarStandardsInfoEO.issueTime).format('YYYY-MM-DD')
|
let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
|
||||||
// }
|
console.log(nowstandinfo)
|
||||||
if (nowstandinfo.putTime != null && nowstandinfo.putTime !== '') {
|
if (nowstandinfo.putTime != null && nowstandinfo.putTime !== '') {
|
||||||
nowstandinfo.putTime = this.$dateFormat(this.sarStandardsInfoEO.putTime, 'yyyy-MM-dd hh:mm:ss')
|
nowstandinfo.putTime = this.$dateFormat(this.sarStandardsInfoEO.putTime, 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
}
|
||||||
|
// 代替标准号
|
||||||
|
if (nowstandinfo.replaceStandNum != null) {
|
||||||
|
nowstandinfo.replaceStandNum = nowstandinfo.replaceStandNum.replace(/,/ig, ',')
|
||||||
|
}
|
||||||
|
if (nowstandinfo.replaceStandNum != null && nowstandinfo.replaceStandNum !== '') {
|
||||||
|
nowstandinfo.replaceStandNum = nowstandinfo.replaceStandNum.replace(/\r\n/g, '<br />')
|
||||||
|
nowstandinfo.replaceStandNum = nowstandinfo.replaceStandNum === '' ? '' : nowstandinfo.replaceStandNum.replace(/\n/g, '<br />')
|
||||||
|
}
|
||||||
|
// 处理动态表单的时间和下拉框格式
|
||||||
|
const formFieldList = this.formFieldList
|
||||||
|
const sarStandAttrObj = {}
|
||||||
|
formFieldList.forEach((item) => {
|
||||||
|
const value = nowstandinfo[item.attrField]
|
||||||
|
// 时间格式处理
|
||||||
|
if (item.attrType === 'DATE_PICKER' && value) {
|
||||||
|
nowstandinfo[item.attrField] = this.$dateFormat(this.sarStandardsInfoEO[item.attrField], 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
}
|
||||||
|
// 数组处理
|
||||||
|
if (item.attrType === 'SEL_OPTION' || item.attrType === 'SEL_OPTS') {
|
||||||
|
if (value != null && (value instanceof Array)) {
|
||||||
|
nowstandinfo[item.attrField] = nowstandinfo[item.attrField].join(',')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sarStandAttrObj[item.attrField] = nowstandinfo[item.attrField]
|
||||||
|
})
|
||||||
|
nowstandinfo['sarStandAttrEOStr'] = JSON.stringify(sarStandAttrObj).replace(/"/g, "'")
|
||||||
|
console.log(formFieldList)
|
||||||
|
console.log(nowstandinfo)
|
||||||
|
this.$http.postData(this.addOrUPdateFlag === 1 ? 'sarStandardsInfo/sar-standards-info/addarStandardsInfo' : 'sarStandardsInfo/sar-standards-info/updateSarStandardsInfo', nowstandinfo, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
this.isSubmit = false
|
||||||
|
if (res.ok) {
|
||||||
|
this.getDomesticStandardTable(this.tableFlag)
|
||||||
|
this.resetForm()
|
||||||
|
if (this.addOrUPdateFlag === 1) {
|
||||||
|
sessionStorage.removeItem('STAND_INLAND')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, e => {
|
||||||
|
this.isSubmit = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.isSubmit = false
|
||||||
|
}
|
||||||
|
}, e => {})
|
||||||
|
} else {
|
||||||
|
this.isSubmit = false
|
||||||
|
this.$message({
|
||||||
|
message: '请检查表单是否填写正确',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// 代替标准号
|
|
||||||
if (nowstandinfo.replaceStandNum != null) {
|
|
||||||
nowstandinfo.replaceStandNum = nowstandinfo.replaceStandNum.replace(/,/ig, ',')
|
|
||||||
}
|
|
||||||
if (nowstandinfo.replaceStandNum != null && nowstandinfo.replaceStandNum !== '') {
|
|
||||||
nowstandinfo.replaceStandNum = nowstandinfo.replaceStandNum.replace(/\r\n/g, '<br />')
|
|
||||||
nowstandinfo.replaceStandNum = nowstandinfo.replaceStandNum === '' ? '' : nowstandinfo.replaceStandNum.replace(/\n/g, '<br />')
|
|
||||||
}
|
|
||||||
// 处理动态表单的时间和下拉框格式
|
|
||||||
const formFieldList = this.formFieldList
|
|
||||||
const sarStandAttrObj = {}
|
|
||||||
formFieldList.forEach((item) => {
|
|
||||||
const value = nowstandinfo[item.attrField]
|
|
||||||
// 时间格式处理
|
|
||||||
if (item.attrType === 'DATE_PICKER' && value) {
|
|
||||||
nowstandinfo[item.attrField] = this.$dateFormat(this.sarStandardsInfoEO[item.attrField], 'yyyy-MM-dd hh:mm:ss')
|
|
||||||
}
|
|
||||||
// 数组处理
|
|
||||||
if (item.attrType === 'SEL_OPTION' || item.attrType === 'SEL_OPTS') {
|
|
||||||
if (value != null && (value instanceof Array)) {
|
|
||||||
nowstandinfo[item.attrField] = nowstandinfo[item.attrField].join(',')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sarStandAttrObj[item.attrField] = nowstandinfo[item.attrField]
|
|
||||||
})
|
|
||||||
nowstandinfo['sarStandAttrEOStr'] = JSON.stringify(sarStandAttrObj).replace(/"/g, "'")
|
|
||||||
// 判断三个实施日期不能全部未N/A和TBD
|
|
||||||
// if ((nowstandinfo.EOPSSRQ === 'N/A' || nowstandinfo.EOPSSRQ === 'TBD' || nowstandinfo.EOPSSRQ === '已实施') &&
|
|
||||||
// (nowstandinfo.XCXSSRQ === 'N/A' || nowstandinfo.XCXSSRQ === 'TBD' || nowstandinfo.XCXSSRQ === '已实施') &&
|
|
||||||
// (nowstandinfo.ZCCSSRQ === 'N/A' || nowstandinfo.ZCCSSRQ === 'TBD' || nowstandinfo.ZCCSSRQ === '已实施')) {
|
|
||||||
// this.isSubmit = false
|
|
||||||
// return this.$message.warning('实施日期必须有一项为日期格式')
|
|
||||||
// }
|
|
||||||
this.isSubmit = true
|
|
||||||
this.$http.postData(this.addOrUPdateFlag === 1 ? 'sarStandardsInfo/sar-standards-info/addarStandardsInfo' : 'sarStandardsInfo/sar-standards-info/updateSarStandardsInfo', nowstandinfo, {
|
|
||||||
_this: this
|
|
||||||
}, res => {
|
|
||||||
this.isSubmit = false
|
|
||||||
if (res.ok) {
|
|
||||||
this.getDomesticStandardTable(this.tableFlag)
|
|
||||||
this.resetForm()
|
|
||||||
if (this.addOrUPdateFlag === 1) {
|
|
||||||
sessionStorage.removeItem('FOREIGN_INLAND')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, e => {
|
|
||||||
this.isSubmit = false
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.isSubmit = false
|
|
||||||
}
|
|
||||||
}, e => {})
|
|
||||||
} else {
|
|
||||||
this.isSubmit = false
|
|
||||||
this.$message({
|
|
||||||
message: '请检查表单是否填写正确',
|
|
||||||
type: 'warning'
|
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
})
|
|
||||||
},
|
|
||||||
// 表格排序
|
// 表格排序
|
||||||
sortChange (sortObj) {
|
sortChange (sortObj) {
|
||||||
if (sortObj.column.order !== 'normal') {
|
if (sortObj.column.order !== 'normal') {
|
||||||
@@ -3812,6 +3939,8 @@ export default {
|
|||||||
// 加载动态表单数据
|
// 加载动态表单数据
|
||||||
this.getAddFormFieldList()
|
this.getAddFormFieldList()
|
||||||
this.getDept()
|
this.getDept()
|
||||||
|
this.busVsFunc()
|
||||||
|
this.modelFunc()
|
||||||
},
|
},
|
||||||
destroyed () {
|
destroyed () {
|
||||||
this.allSelectOptions = {}
|
this.allSelectOptions = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user