feat: 标准库
This commit is contained in:
@@ -1859,6 +1859,9 @@
|
||||
}else if(this.fileType === 'ca'){
|
||||
this.form.ca = response.data.id;
|
||||
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({
|
||||
showClose: true,
|
||||
|
||||
@@ -1745,22 +1745,26 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
popoverHideBusVs (checkedIds, checkedData) {
|
||||
this.sarStandardsInfoEO.CYCVPPSBM = checkedData.code
|
||||
this.sarStandardsInfoEO.CYCVPPSCN = checkedData.chineseName
|
||||
console.log(checkedData)
|
||||
console.log(this.sarStandardsInfoEO.CYCVPPSBM)
|
||||
console.log(this.sarStandardsInfoEO.CYCVPPSCN)
|
||||
this.$forceUpdate()
|
||||
if(checkedData){
|
||||
this.sarStandardsInfoEO.CYCVPPSBM = checkedData.code
|
||||
this.sarStandardsInfoEO.CYCVPPSCN = checkedData.chineseName
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
popoverHideCarVs (checkedIds, checkedData) {
|
||||
this.sarStandardsInfoEO.KCCVPPSBM = checkedData.code
|
||||
this.sarStandardsInfoEO.KCCVPPSCN = checkedData.chineseName
|
||||
this.$forceUpdate()
|
||||
if(checkedData){
|
||||
this.sarStandardsInfoEO.KCCVPPSBM = checkedData.code
|
||||
this.sarStandardsInfoEO.KCCVPPSCN = checkedData.chineseName
|
||||
this.$forceUpdate()
|
||||
}
|
||||
|
||||
},
|
||||
popoverHideModel (checkedIds, checkedData) {
|
||||
this.sarStandardsInfoEO.DYBXH = checkedData.model
|
||||
this.sarStandardsInfoEO.DYMC = checkedData.name
|
||||
this.$forceUpdate()
|
||||
if(checkedData){
|
||||
this.sarStandardsInfoEO.DYBXH = checkedData.model
|
||||
this.sarStandardsInfoEO.DYMC = checkedData.name
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
busVsFunc(){
|
||||
this.$http.get('sarVppsTree/list', '', {
|
||||
@@ -1777,7 +1781,9 @@ export default {
|
||||
})
|
||||
},
|
||||
popoverHide (checkedIds, checkedData) {
|
||||
this.sarStandardsInfoEO.standSystem = checkedData.id
|
||||
if(checkedData){
|
||||
this.sarStandardsInfoEO.standSystem = checkedData.id
|
||||
}
|
||||
},
|
||||
closeModal () {
|
||||
this.productModal = false
|
||||
@@ -2013,7 +2019,8 @@ export default {
|
||||
Promise.all([this.queryDisplayLocation()]).then((values) => {
|
||||
const [displayLocation] = values
|
||||
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){
|
||||
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
|
||||
}
|
||||
@@ -2783,6 +2790,7 @@ export default {
|
||||
// 验证标准号是否唯一
|
||||
this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
|
||||
if (flag) {
|
||||
debugger
|
||||
// 时间格式修改
|
||||
let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
|
||||
console.log(nowstandinfo)
|
||||
|
||||
@@ -425,14 +425,14 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<custom-date-pick-with-text2
|
||||
<custom-date-pick
|
||||
:config="{
|
||||
attrName: '发布日期',
|
||||
attrField: 'issueTime'
|
||||
}"
|
||||
v-model="sarStandardsInfoEO.issueTime"
|
||||
:disabled="formdisableflag"
|
||||
></custom-date-pick-with-text2>
|
||||
></custom-date-pick>
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item
|
||||
prop="isRelateAccess"
|
||||
@@ -475,12 +475,12 @@
|
||||
></custom-SVPPS>
|
||||
</template>
|
||||
<template v-else-if="field.attrField === 'XCXSSRQ' || field.attrField === 'ZCCSSRQ'">
|
||||
<custom-date-pick-with-text
|
||||
<custom-date-pick
|
||||
:key="field.attrField"
|
||||
:config="field"
|
||||
v-model="sarStandardsInfoEO[field.attrField]"
|
||||
:disabled="formdisableflag"
|
||||
></custom-date-pick-with-text>
|
||||
></custom-date-pick>
|
||||
</template>
|
||||
<template v-else-if="field.attrType === 'DATE_PIC_OPTS'">
|
||||
<custom-date-pick-group
|
||||
@@ -501,6 +501,75 @@
|
||||
:data-source="field.attrField === 'CBBH'"
|
||||
></custom-input-for-standards>
|
||||
</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>
|
||||
<custom-input
|
||||
:key="field.attrField"
|
||||
@@ -1067,8 +1136,22 @@ export default {
|
||||
children: 'children',
|
||||
label: 'menuName'
|
||||
},
|
||||
nodeKeyCode: 'code',
|
||||
nodeKeyModel: 'model',
|
||||
nodeKey: 'id',
|
||||
defaultCheckedKeys: [],
|
||||
defaultCheckedKeys1: [],
|
||||
defaultCheckedKeys2: [],
|
||||
defaultCheckedKeys3: [],
|
||||
defaultCodeProps: {
|
||||
children: 'children',
|
||||
label: 'code'
|
||||
},
|
||||
defaultModelProps: {
|
||||
children: 'children',
|
||||
label: 'model'
|
||||
},
|
||||
busVppsOptions: [], // 车系体系架构
|
||||
modelOptions: [], // 模块体系架构
|
||||
productModal: false, // 模态框是否打开
|
||||
modalType: '',
|
||||
productTitle: '', // 模态框标题
|
||||
@@ -1341,7 +1424,13 @@ export default {
|
||||
sentScreenFileFeedback: '',
|
||||
approvalFileTime: '',
|
||||
approvalFileFeedback: '',
|
||||
certPutTimeList: []
|
||||
certPutTimeList: [],
|
||||
CYCVPPSBM: '',
|
||||
CYCVPPSCN: '',
|
||||
KCCVPPSBM: '',
|
||||
KCCVPPSCN: '',
|
||||
DYBXH: '',
|
||||
DYMC: '',
|
||||
}, // 标准新增过程中用到的对象
|
||||
currentFileList: '', // 当前操作的是哪个FormItem的上传
|
||||
isList: [
|
||||
@@ -1648,11 +1737,46 @@ export default {
|
||||
watch: {
|
||||
},
|
||||
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) {
|
||||
console.log(checkedIds);
|
||||
console.log(checkedData);
|
||||
this.sarStandardsInfoEO.standSystem = checkedData.id
|
||||
console.log(this.sarStandardsInfoEO.standSystem);
|
||||
if(checkedData){
|
||||
this.sarStandardsInfoEO.standSystem = checkedData.id
|
||||
}
|
||||
},
|
||||
closeModal () {
|
||||
this.productModal = false
|
||||
@@ -1854,12 +1978,12 @@ export default {
|
||||
this.addOrUPdateFlag = 2
|
||||
this.modalshowtitle = '编辑海外标准'
|
||||
this.modalshowflag = true
|
||||
|
||||
this.resolveFormFieldList(item.isRelateAccess)
|
||||
this.$nextTick(() => {
|
||||
Promise.all([this.queryDisplayLocation()]).then((values) => {
|
||||
const [displayLocation] = values
|
||||
const formFieldList = this.formFieldList
|
||||
console.log(formFieldList)
|
||||
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
|
||||
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
|
||||
this.sarStandardsInfoEO.standSort = item.standSort
|
||||
@@ -1885,6 +2009,15 @@ export default {
|
||||
if (value && field.attrType === 'DATE_PICKER') {
|
||||
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
|
||||
// 追加用户名称和部门名称
|
||||
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('保存成功')
|
||||
},
|
||||
// 保存或修改标准
|
||||
saveOrUpdateStands () {
|
||||
this.$refs['sarStandardsInfoForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
// 验证标准号是否唯一
|
||||
this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
|
||||
if (flag) {
|
||||
// 时间格式修改
|
||||
let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
|
||||
// if (nowstandinfo.issueTime != null && nowstandinfo.issueTime !== '') {
|
||||
// nowstandinfo.issueTime = this.$moment(this.sarStandardsInfoEO.issueTime).format('YYYY-MM-DD')
|
||||
// }
|
||||
if (nowstandinfo.putTime != null && nowstandinfo.putTime !== '') {
|
||||
nowstandinfo.putTime = this.$dateFormat(this.sarStandardsInfoEO.putTime, 'yyyy-MM-dd hh:mm:ss')
|
||||
saveOrUpdateStands () {
|
||||
this.isSubmit = true
|
||||
this.$refs['sarStandardsInfoForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
// 验证标准号是否唯一
|
||||
this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
|
||||
if (flag) {
|
||||
debugger
|
||||
// 时间格式修改
|
||||
let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
|
||||
console.log(nowstandinfo)
|
||||
if (nowstandinfo.putTime != null && nowstandinfo.putTime !== '') {
|
||||
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) {
|
||||
if (sortObj.column.order !== 'normal') {
|
||||
@@ -3812,6 +3939,8 @@ export default {
|
||||
// 加载动态表单数据
|
||||
this.getAddFormFieldList()
|
||||
this.getDept()
|
||||
this.busVsFunc()
|
||||
this.modelFunc()
|
||||
},
|
||||
destroyed () {
|
||||
this.allSelectOptions = {}
|
||||
|
||||
Reference in New Issue
Block a user