From f4e40475c68e02f7f4cfdbc3832e609a3d2c7488 Mon Sep 17 00:00:00 2001
From: yanyizhou <2311759275@qq.com>
Date: Tue, 14 Sep 2021 14:50:46 +0800
Subject: [PATCH 01/31] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E6=A0=87=E5=87=86?=
=?UTF-8?q?=E5=BA=93=E5=90=8C=E6=AD=A5=E7=9A=84=E6=96=87=E6=9C=AC=E7=8A=B6?=
=?UTF-8?q?=E6=80=81=E4=B8=BA=E5=8F=82=E8=80=83=E6=98=AF=E9=BB=84=E8=89=B2?=
=?UTF-8?q?=E7=9A=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/EnterpriseStandardDatabase.vue | 32 ++++++++++++-------
1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue
index 9e73e72fc..3f5a410f6 100644
--- a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue
+++ b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue
@@ -297,8 +297,9 @@
>
- {{ scope.row.standCode }}
- {{ scope.row.standCode }}
+ {{ scope.row.standCode }}
+ {{ scope.row.standCode }}
+ {{ scope.row.standCode }}
@@ -1399,7 +1429,9 @@
审批人
+ 审批人
+
')
- nowstandinfo.replaceStandNum = nowstandinfo.replaceStandNum === '' ? '' : nowstandinfo.replaceStandNum.replace(/\n/g, '
')
- }
- // 处理动态表单的时间和下拉框格式
- const formFieldList = this.formFieldList
- const sarStandAttrObj = {}
-
- formFieldList.forEach((item) => {
- const value = nowstandinfo[item.attrField]
- // 时间格式处理
- if (item.attrType === 'DATE_PICKER' && value) {
- nowstandinfo[item.attrField] = this.sarStandardsInfoEO[item.attrField]
- }
- // 数组处理
- 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("nowstandinfo");
- 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')
- }
-
- console.log("hello")
- console.log(formFieldList);
- let standardToLawsInfo={'countryArea':'','standId':'','ssrq':'','zccssrqgj':'','xcxssrqgj':''}
- standardToLawsInfo.countryArea=nowstandinfo.country;
- standardToLawsInfo.standId=nowstandinfo.id;
- standardToLawsInfo.ssrq=nowstandinfo.SSRQ;
- standardToLawsInfo.zccssrqgj=nowstandinfo.ZCCSSRQ;
- standardToLawsInfo.xcxssrqgj=nowstandinfo.XCXSSRQ;
-
- console.log("country")
- console.log(standardToLawsInfo);
- this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/standardToLaws',
- standardToLawsInfo,
- {_this:this}
- )
-
-
-
- }
- }, e => {
- this.isSubmit = false
- })
-
-
-
-
-
-
- } else {
- this.isSubmit = false
- }
- }, e => {})
- } else {
- this.isSubmit = false
- this.$message({
- message: '请检查表单是否填写正确',
- type: 'warning'
- })
+ saveOrUpdateStands() {
+ this.isSubmit = true
+ this.$refs['sarStandardsInfoForm'].validate((valid) => {
+ if (valid) {
+ // 验证标准号是否唯一
+ this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
+ if (flag) {
+ // 时间格式修改
+ this.sarStandardsInfoEO.country = this.sarStandardsInfoEO.countryArr;
+ let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
+ 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, '
')
+ nowstandinfo.replaceStandNum = nowstandinfo.replaceStandNum === '' ? '' : nowstandinfo.replaceStandNum.replace(/\n/g, '
')
+ }
+ // 处理动态表单的时间和下拉框格式
+ const formFieldList = this.formFieldList
+ const sarStandAttrObj = {}
+
+ formFieldList.forEach((item) => {
+ const value = nowstandinfo[item.attrField]
+ // 时间格式处理
+ if (item.attrType === 'DATE_PICKER' && value) {
+ nowstandinfo[item.attrField] = this.sarStandardsInfoEO[item.attrField]
+ }
+ // 数组处理
+ 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, "'")
+ 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')
+ }
+
+ let standardToLawsInfo = {
+ 'countryArea': '',
+ 'standId': '',
+ 'ssrq': '',
+ 'zccssrqgj': '',
+ 'xcxssrqgj': ''
+ }
+ standardToLawsInfo.countryArea = nowstandinfo.country;
+ standardToLawsInfo.standId = nowstandinfo.id;
+ standardToLawsInfo.ssrq = nowstandinfo.SSRQ;
+ standardToLawsInfo.zccssrqgj = nowstandinfo.ZCCSSRQ;
+ standardToLawsInfo.xcxssrqgj = nowstandinfo.XCXSSRQ;
+
+ this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/standardToLaws',
+ standardToLawsInfo,
+ {_this: this}
+ )
+
+
+ }
+ }, 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') {
this.nowOrder = ''
@@ -3229,46 +3258,46 @@ export default {
// 后台联调
this.orderBy = 1;
this.nowOrder = sortObj.column.order
- if (this.nowOrder === 'ascending'){
- this.nowOrder=2
- }else if (this.nowOrder === 'descending') {
- this.nowOrder=1
+ if (this.nowOrder === 'ascending') {
+ this.nowOrder = 2
+ } else if (this.nowOrder === 'descending') {
+ this.nowOrder = 1
}
break
case 'XCXSSRQ' :
this.orderBy = 2;
this.nowOrder = sortObj.column.order
- if (this.nowOrder === 'ascending'){
- this.nowOrder=2
- }else if (this.nowOrder === 'descending') {
- this.nowOrder=1
+ if (this.nowOrder === 'ascending') {
+ this.nowOrder = 2
+ } else if (this.nowOrder === 'descending') {
+ this.nowOrder = 1
}
break
case 'ZCCSSRQ' :
this.orderBy = 3;
this.nowOrder = sortObj.column.order
- if (this.nowOrder === 'ascending'){
- this.nowOrder=2
- }else if (this.nowOrder === 'descending') {
- this.nowOrder=1
+ if (this.nowOrder === 'ascending') {
+ this.nowOrder = 2
+ } else if (this.nowOrder === 'descending') {
+ this.nowOrder = 1
}
break
case 'textStatus' :
this.orderBy = 5;
this.nowOrder = sortObj.column.order
- if (this.nowOrder === 'ascending'){
- this.nowOrder=2
- }else if (this.nowOrder === 'descending') {
- this.nowOrder=1
+ if (this.nowOrder === 'ascending') {
+ this.nowOrder = 2
+ } else if (this.nowOrder === 'descending') {
+ this.nowOrder = 1
}
break
case 'SSRQ' :
this.orderBy = 6;
this.nowOrder = sortObj.column.order
- if (this.nowOrder === 'ascending'){
- this.nowOrder=2
- }else if (this.nowOrder === 'descending') {
- this.nowOrder=1
+ if (this.nowOrder === 'ascending') {
+ this.nowOrder = 2
+ } else if (this.nowOrder === 'descending') {
+ this.nowOrder = 1
}
break
@@ -3278,12 +3307,12 @@ export default {
},
// 分页点击后方法
- pageChange (page) {
+ pageChange(page) {
this.standCommonlySearch.page = page
this.getDomesticStandardTable()
},
// 分页每页显示数改变后方法
- pageSizeChange (pageSize) {
+ pageSizeChange(pageSize) {
this.standCommonlySearch.pageSize = pageSize
this.standCommonlySearch.page = 1
this.getDomesticStandardTable()
@@ -3293,7 +3322,7 @@ export default {
* item 判断是高级检索还是普通检索
* 1、空:普通检索 2:高级检索
* */
- getDomesticStandardTable (item) {
+ getDomesticStandardTable(item) {
// if (item === 2) {
// data.standSort = ''
@@ -3376,7 +3405,6 @@ export default {
}
if (res.data.list[i].attrInfoMap && res.data.list[i].attrInfoMap.SSRQ) {
res.data.list[i].SSRQ = res.data.list[i].attrInfoMap.SSRQ
- console.log(res.data.list[i].SSRQ);
}
}
this.stahndinfoList = res.data.list
@@ -3399,7 +3427,7 @@ export default {
}
},
// 查询处于游离态的标准
- selectConfiguraStand () {
+ selectConfiguraStand() {
this.sarConfigStandSearch.page = this.configPage
// this.sarConfigStandSearch.pageSize = this.configRows
this.sarConfigStandSearch.pageSize = this.$store.getters.userInfo.configContent
@@ -3419,7 +3447,7 @@ export default {
})
},
// 获取组织机构数据
- getOrgTreeSource () {
+ getOrgTreeSource() {
this.$http.get('sys/org/getTree', {}, {
_this: this
},
@@ -3441,19 +3469,20 @@ export default {
this.zNodesSItem = JSON.parse(JSON.stringify(treeNode))
this.searchInlandNodes = JSON.parse(JSON.stringify(treeNode))
}
- }, e => {})
+ }, e => {
+ })
},
// 所属部门选取
- treeDblClick (treeId, treeNode) {
+ treeDblClick(treeId, treeNode) {
this.sarStandardsInfoEO.responsibleUnit = treeNode.id
this.sarStandardsInfoEO.orgName = treeNode.name
$('#deptBtn').click()
},
- inputChange () {
+ inputChange() {
this.modalshowflag = true
},
// 代替标准号搜索
- selectStands () {
+ selectStands() {
// if (this.standNumFlag === 1) {
// this.$refs.selections.selectAll(false)
// }
@@ -3461,17 +3490,17 @@ export default {
this.replaceStandNumModel = true
this.getReplaceStandNumRow('')
},
- selectReplaceStandNumRowChange (row) {
+ selectReplaceStandNumRowChange(row) {
this.replaceStandNumModelNum = row
},
- selectLawsExplainQuoteRowChange (row) {
+ selectLawsExplainQuoteRowChange(row) {
this.lawsExplainQuoteModelNum = row
},
// 试验项目
- selectTestItemRowChange (row) {
+ selectTestItemRowChange(row) {
this.testItemModelNum = row
},
- selectTestItemRowSelect (selection, flag, row) {
+ selectTestItemRowSelect(selection, flag, row) {
let index = ''
if (row) {
this.selectedList2.map((item, rowIndex) => {
@@ -3511,7 +3540,7 @@ export default {
})
}
},
- selectLawsExplainQuoteRowSelect (selection, flag, row) {
+ selectLawsExplainQuoteRowSelect(selection, flag, row) {
let index = ''
if (row) {
this.selectedList1.map((item, rowIndex) => {
@@ -3552,7 +3581,7 @@ export default {
}
},
// 代替标准号
- getReplaceStandNumRow (page = 1, pageSize = this.$store.getters.userInfo.configContent) {
+ getReplaceStandNumRow(page = 1, pageSize = this.$store.getters.userInfo.configContent) {
this.replaceStandNumForm.page = this.replacePage
this.replaceStandNumForm.pageSize = this.$store.getters.userInfo.configContent
if (page === '') {
@@ -3593,7 +3622,7 @@ export default {
*@author: zhangRui
*@time: 2020/08/25 11:52:47
*/
- selectReplaceStandNumRowSelect (selection, flag, row) {
+ selectReplaceStandNumRowSelect(selection, flag, row) {
let index = ''
if (row) {
this.selectedListRep.map((item, rowIndex) => {
@@ -3633,7 +3662,7 @@ export default {
})
}
},
- lawsExplainQuoteModelBt () {
+ lawsExplainQuoteModelBt() {
if (typeof this.sarStandardsInfoEO.lawsExplainQuote === 'string') {
this.sarStandardsInfoEO.lawsExplainQuote = this.sarStandardsInfoEO.lawsExplainQuote.split('')
}
@@ -3674,11 +3703,11 @@ export default {
this.lawsExplainQuoteModel = false
})
},
- canle () {
+ canle() {
this.lawsExplainQuoteModel = false
},
// 法规解读标准引用
- lawsExplainQuoteClick () {
+ lawsExplainQuoteClick() {
this.getLawsExplainQuoteRow('')
this.lawsExplainQuoteModel = true
if (this.lawsExplainQuoteModel) {
@@ -3690,33 +3719,33 @@ export default {
// this.$refs.selection.selectAll(false)
this.testItemsForm.standNumber = ''
},
- pageChangeLaws (page) {
+ pageChangeLaws(page) {
this.page = page
this.getLawsExplainQuoteRow()
},
- pageSizeChangeLaws (pageSize) {
+ pageSizeChangeLaws(pageSize) {
this.rows = pageSize
this.getLawsExplainQuoteRow()
},
// 法规分页
- pageChangeReplace (page) {
+ pageChangeReplace(page) {
this.replacePage = page
this.getReplaceStandNumRow()
},
- pageSizeChangeReplace (pageSize) {
+ pageSizeChangeReplace(pageSize) {
this.replaceRows = pageSize
this.getReplaceStandNumRow()
},
// 试验项目分页
- pageChangeItems (page) {
+ pageChangeItems(page) {
this.pageItems = page
this.getTestItemRow()
},
- pageSizeChangeItems (pageSize) {
+ pageSizeChangeItems(pageSize) {
this.itemsRows = pageSize
this.getTestItemRow()
},
- testItemsModellBt () {
+ testItemsModellBt() {
if (this.selectedList2.length === 0) {
return this.$message({
message: '请先选择数据',
@@ -3749,7 +3778,7 @@ export default {
this.testItemsModel = false
})
},
- getLawsExplainQuoteRow (page = 1, pageSize = this.$store.getters.userInfo.configContent) {
+ getLawsExplainQuoteRow(page = 1, pageSize = this.$store.getters.userInfo.configContent) {
this.lawsExplainQuoteForm.page = this.page
this.lawsExplainQuoteForm.pageSize = this.$store.getters.userInfo.configContent
if (page === '') {
@@ -3777,7 +3806,7 @@ export default {
}, e => {
})
},
- getTestItemRow (page = 1, pageSize = this.$store.getters.userInfo.configContent) {
+ getTestItemRow(page = 1, pageSize = this.$store.getters.userInfo.configContent) {
this.testItemsForm.page = this.pageItems
this.testItemsForm.pageSize = this.$store.getters.userInfo.configContent
if (page === '') {
@@ -3806,12 +3835,12 @@ export default {
})
},
// 文件上传时的钩子函数
- onProgress (event, file, fileList) {
+ onProgress(event, file, fileList) {
this.exportLoading = true
this.importModalshowflag = false
},
// 导入标准数据成功后执行
- importFileSuccess (response, file) {
+ importFileSuccess(response, file) {
this.exportLoading = false
if (response.ok) {
this.showUploadlist = true
@@ -3834,7 +3863,7 @@ export default {
}
},
// 查看标准条目
- selectSarStandItems (standid) {
+ selectSarStandItems(standid) {
this.modalStandItemflag = true
this.standItemSearch.standId = standid
this.$http.get('lawss/sarStandItems/getSarStandItemsList', this.standItemSearch, {
@@ -3846,7 +3875,7 @@ export default {
})
},
// 点击配置标准弹出相应模态框
- configurationStandard () {
+ configurationStandard() {
// this.getMenu().then(boolean => {
// if (boolean) {
const winWidth = window.screen.width
@@ -3889,7 +3918,7 @@ export default {
// })
},
// 判断当前左侧树节点是否是我的收藏和个性化标签
- getMenu () {
+ getMenu() {
return new Promise((resolve, reject) => {
let menu = this.selectSarMenu
if (menu.id === 'gxhbq' || menu.pId === 'gxhbq' || menu.id === 'wdsc' || menu.pId === 'wdsc') {
@@ -3900,12 +3929,12 @@ export default {
})
},
// 取消配置标准
- cancelConfigStand () {
+ cancelConfigStand() {
this.configStandFlag = false
this.selectConfigStand = []
},
// 表对应标准移除分类到
- deleteStandFromKind (flag, item) {
+ deleteStandFromKind(flag, item) {
// this.getMenu().then(boolean => {
// if (boolean) {
if (this.selectSarMenu.parentId == null || this.selectSarMenu.parentId === '') {
@@ -3974,28 +4003,28 @@ export default {
// })
},
// 分页点击后方法
- configuraPageChange (page) {
+ configuraPageChange(page) {
this.configPage = page
this.selectConfiguraStand()
},
// 分页每页显示数改变后方法
- configuraPageSizeChange (pageSize) {
+ configuraPageSizeChange(pageSize) {
this.configRows = pageSize
this.selectConfiguraStand()
// 此处需要调用接口,修改个人配置
},
- searchConfiguraStand () {
+ searchConfiguraStand() {
this.sarConfigStandSearch.page = 1
this.selectConfiguraStand()
},
- selectConfigStandChange (alldata) {
+ selectConfigStandChange(alldata) {
this.selectConfigStand = []
for (let i = 0; i < alldata.length; i++) {
this.selectConfigStand.push(alldata[i].id)
}
},
// 提交配置搜索项
- saveConfigStand () {
+ saveConfigStand() {
let search = {}
search.menuId = this.selectSarMenu.id
if (this.selectConfigStand.length === 0) {
@@ -4024,13 +4053,13 @@ export default {
/**
* 获取新增弹框的表单
*/
- getAddFormFieldList (isEdit) {
+ getAddFormFieldList(isEdit) {
this.$http.get('lawss/sarStandAttrDetails/list', {}, {
_this: this
},
res => {
if (res.ok) {
- const { data = {} } = res
+ const {data = {}} = res
this.formFieldListData = data['FOREIGN_STAND'] || []
const formFieldListData = data['FOREIGN_STAND'] || []
// 追加高级查询动态下拉框数据s
@@ -4117,12 +4146,13 @@ export default {
this.twoOptions = twoOptions
// this.resolveFormFieldList()
}
- }, e => {})
+ }, e => {
+ })
},
/**
* 展示位置
*/
- queryDisplayLocation () {
+ queryDisplayLocation() {
return new Promise((resolve, reject) => {
this.$http.get('lawssBase/utArea/getAreaList', {
sarType: 'FOREIGN_STAND'
@@ -4136,7 +4166,7 @@ export default {
})
},
// 新增时不用
- selectStandMessage () {
+ selectStandMessage() {
return new Promise((resolve, reject) => {
this.$http.get('lawss/sarStandardsInfo/getStandInfoById', {id: this.sarStandardsInfoEO.id}, {
_this: this, loading: 'loading'
@@ -4168,74 +4198,74 @@ export default {
})
})
},
- resolveFormFieldList (isEdit) {
- const data = this.formFieldListData
- this.formFieldList = data.map((item) => {
- if (item.attrType === 'SEL_OPTION' || item.attrType === 'SEL_OPTS') {
- if(item.attrField === 'WSSMR'){
- return Object.assign({}, item, {
- options: this.allSelectOptions["WSSMR"]
- })
- }else if(item.attrField === 'QCDW'){
- return Object.assign({}, item, {
- options: this.allSelectOptions["QCDW"]
- })
- }else if(item.attrField === 'CYSD'){
- return Object.assign({}, item, {
- options: this.allSelectOptions["WSCYSD"]
- })
- }else if(item.attrField === 'CLLX'){
- return Object.assign({}, item, {
- options: this.allSelectOptions["ENERGYTYPES"]
- })
- }else if(item.attrField === 'NYLX'){
- return Object.assign({}, item, {
- options: this.allSelectOptions["NYLXCLASS"]
- })
- }else if(item.attrField === 'SYCPX'){
- return Object.assign({}, item, {
- options: this.allSelectOptions["SYCPXCLASS"]
- })
- }else if(item.attrField === 'SYRZ'){
- return Object.assign({}, item, {
- options: this.allSelectOptions["SYRZCLASS"]
- })
- }else if(item.attrField === 'ZRBM'){
- return Object.assign({}, item, {
- options: this.allSelectOptions["ZRBMCLASS"]
- })
- }else if(item.attrField === 'ZRGCS'){
- return Object.assign({}, item, {
- options: this.allSelectOptions["ZRGCSCLASS"]
- })
- }else if(item.attrField === 'TXLB'){
- return Object.assign({}, item, {
- options: this.allSelectOptions["TXLBCLASS"]
- })
- }else {
- return Object.assign({}, item, {
- options: this.allSelectOptions[item.selVal]
- })
- }
- } else {
- return item
- }
- })
- // 处理时间格式的数据
- data.forEach(item => {
- if (item.attrType === 'DATE_PICKER') {
- const date = this.sarStandardsInfoEO[item.attrField] ? new Date(this.sarStandardsInfoEO[item.attrField]) : ''
- this.$set(this.sarStandardsInfoEO, item.attrField, date)
- } else {
- this.$set(this.sarStandardsInfoEO, item.attrField, this.sarStandardsInfoEO[item.attrField] || '')
- }
- })
- this.resolveFormFieldListRules(isEdit)
- },
+ resolveFormFieldList(isEdit) {
+ const data = this.formFieldListData
+ this.formFieldList = data.map((item) => {
+ if (item.attrType === 'SEL_OPTION' || item.attrType === 'SEL_OPTS') {
+ if (item.attrField === 'WSSMR') {
+ return Object.assign({}, item, {
+ options: this.allSelectOptions["WSSMR"]
+ })
+ } else if (item.attrField === 'QCDW') {
+ return Object.assign({}, item, {
+ options: this.allSelectOptions["QCDW"]
+ })
+ } else if (item.attrField === 'CYSD') {
+ return Object.assign({}, item, {
+ options: this.allSelectOptions["WSCYSD"]
+ })
+ } else if (item.attrField === 'CLLX') {
+ return Object.assign({}, item, {
+ options: this.allSelectOptions["ENERGYTYPES"]
+ })
+ } else if (item.attrField === 'NYLX') {
+ return Object.assign({}, item, {
+ options: this.allSelectOptions["NYLXCLASS"]
+ })
+ } else if (item.attrField === 'SYCPX') {
+ return Object.assign({}, item, {
+ options: this.allSelectOptions["SYCPXCLASS"]
+ })
+ } else if (item.attrField === 'SYRZ') {
+ return Object.assign({}, item, {
+ options: this.allSelectOptions["SYRZCLASS"]
+ })
+ } else if (item.attrField === 'ZRBM') {
+ return Object.assign({}, item, {
+ options: this.allSelectOptions["ZRBMCLASS"]
+ })
+ } else if (item.attrField === 'ZRGCS') {
+ return Object.assign({}, item, {
+ options: this.allSelectOptions["ZRGCSCLASS"]
+ })
+ } else if (item.attrField === 'TXLB') {
+ return Object.assign({}, item, {
+ options: this.allSelectOptions["TXLBCLASS"]
+ })
+ } else {
+ return Object.assign({}, item, {
+ options: this.allSelectOptions[item.selVal]
+ })
+ }
+ } else {
+ return item
+ }
+ })
+ // 处理时间格式的数据
+ data.forEach(item => {
+ if (item.attrType === 'DATE_PICKER') {
+ const date = this.sarStandardsInfoEO[item.attrField] ? new Date(this.sarStandardsInfoEO[item.attrField]) : ''
+ this.$set(this.sarStandardsInfoEO, item.attrField, date)
+ } else {
+ this.$set(this.sarStandardsInfoEO, item.attrField, this.sarStandardsInfoEO[item.attrField] || '')
+ }
+ })
+ this.resolveFormFieldListRules(isEdit)
+ },
/**
* 生成校验规则
*/
- resolveFormFieldListRules (isEdit) {
+ resolveFormFieldListRules(isEdit) {
this.reloadAddForm = false
const formFieldList = this.formFieldList
const rules = {...this.defaultAddFormFieldRules}
@@ -4245,15 +4275,15 @@ export default {
if (item.attrType === 'DATE_PICKER') {
rule.push({required: true, type: 'date', message: `${item.attrName}不能为空`, trigger: 'blur'})
} else if (item.attrType === 'SEL_OPTION') {
- rule.push({ required: true, message: `${item.attrName}不能为空`, trigger: 'change' })
+ rule.push({required: true, message: `${item.attrName}不能为空`, trigger: 'change'})
} else if (item.attrType === 'DATE_PIC_OPTS') {
- rule.push({ required: true, message: `${item.attrName}不能为空`, trigger: 'change' })
+ rule.push({required: true, message: `${item.attrName}不能为空`, trigger: 'change'})
} else if (item.attrType === 'INPUT_NUM') {
- rule.push({ required: true, message: `${item.attrName}不能为空`, trigger: 'blur' })
+ rule.push({required: true, message: `${item.attrName}不能为空`, trigger: 'blur'})
} else if (item.attrType === 'SEL_OPTS') {
- rule.push({ required: true, message: `${item.attrName}不能为空`, trigger: 'change' })
- }else if(item.attrType ==='INPUT_STR'){
- rule.push({ required: true, message: `${item.attrName}不能为空`, trigger: 'change' })
+ rule.push({required: true, message: `${item.attrName}不能为空`, trigger: 'change'})
+ } else if (item.attrType === 'INPUT_STR') {
+ rule.push({required: true, message: `${item.attrName}不能为空`, trigger: 'change'})
}
}
// isEdit 为0 标准状态不是必填
@@ -4265,8 +4295,14 @@ export default {
if (item.attrField === 'DTBJH' || item.attrField === 'YYBJ') {
rule.push({type: 'string', max: 100, message: `${item.attrName}不能超过100个字符`, trigger: 'blur'})
} else {
- rule.push({type: 'string', max: item.attrLen, message: `${item.attrName}不能超过${item.attrLen}个字符`, trigger: 'blur'})
- } }
+ rule.push({
+ type: 'string',
+ max: item.attrLen,
+ message: `${item.attrName}不能超过${item.attrLen}个字符`,
+ trigger: 'blur'
+ })
+ }
+ }
if (item.attrField === 'DTBJH' || item.attrField === 'YYBJ' || item.attrField === 'BYYBJ' || item.attrField === 'CBBH' || item.attrField === 'DXBZ') {
if (item.attrField === 'CBBH') {
rule.push({type: 'string', validator: this.verify.validateStandardItemNoRepeat, trigger: 'blur'})
@@ -4293,7 +4329,7 @@ export default {
* 是否添加进标准法规清单change事件
* 动态改变必填项
* */
- isRegulationsChange (val) {
+ isRegulationsChange(val) {
if (val === '0') {
const formFieldList = this.formFieldList
const rules = {...this.defaultAddFormFieldRules}
@@ -4303,17 +4339,22 @@ export default {
if (item.attrType === 'DATE_PICKER') {
rule.push({required: false, type: 'date', message: `${item.attrName}不能为空`, trigger: 'change'})
} else if (item.attrType === 'SEL_OPTION') {
- rule.push({ required: false, message: `${item.attrName}不能为空`, trigger: 'change' })
+ rule.push({required: false, message: `${item.attrName}不能为空`, trigger: 'change'})
} else if (item.attrType === 'DATE_PIC_OPTS') {
- rule.push({ required: false, message: `${item.attrName}不能为空`, trigger: 'change' })
+ rule.push({required: false, message: `${item.attrName}不能为空`, trigger: 'change'})
} else if (item.attrType === 'INPUT_NUM') {
- rule.push({ required: false, message: `${item.attrName}不能为空`, trigger: 'change' })
+ rule.push({required: false, message: `${item.attrName}不能为空`, trigger: 'change'})
} else if (item.attrType === 'SEL_OPTS') {
- rule.push({ required: false, message: `${item.attrName}不能为空`, trigger: 'change' })
+ rule.push({required: false, message: `${item.attrName}不能为空`, trigger: 'change'})
}
}
if (item.attrLen && item.attrType !== 'INPUT_NUM' && item.attrType !== 'DATE_PICKER' && item.attrType !== 'SEL_OPTION' && item.attrType !== 'SEL_OPTS' && item.attrType !== 'DATE_PIC_OPTS') {
- rule.push({type: 'string', max: item.attrLen, message: `${item.attrName}不能超过${item.attrLen}个字符`, trigger: 'change'})
+ rule.push({
+ type: 'string',
+ max: item.attrLen,
+ message: `${item.attrName}不能超过${item.attrLen}个字符`,
+ trigger: 'change'
+ })
}
if (rule.length > 0) {
rules[item.attrField] = rule
@@ -4334,19 +4375,24 @@ export default {
if (item.attrType === 'DATE_PICKER') {
rule.push({required: true, type: 'date', message: `${item.attrName}不能为空`, trigger: 'change'})
} else if (item.attrType === 'SEL_OPTION') {
- rule.push({ required: true, message: `${item.attrName}不能为空`, trigger: 'change' })
+ rule.push({required: true, message: `${item.attrName}不能为空`, trigger: 'change'})
} else if (item.attrType === 'DATE_PIC_OPTS') {
- rule.push({ required: true, message: `${item.attrName}不能为空`, trigger: 'change' })
+ rule.push({required: true, message: `${item.attrName}不能为空`, trigger: 'change'})
} else if (item.attrType === 'INPUT_NUM') {
- rule.push({ required: true, message: `${item.attrName}不能为空`, trigger: 'change' })
+ rule.push({required: true, message: `${item.attrName}不能为空`, trigger: 'change'})
} else if (item.attrType === 'SEL_OPTS') {
- rule.push({ required: true, message: `${item.attrName}不能为空`, trigger: 'change' })
- }else if(item.attrType ==='INPUT_STR'){
- rule.push({ required: true, message: `${item.attrName}不能为空`, trigger: 'change' })
+ rule.push({required: true, message: `${item.attrName}不能为空`, trigger: 'change'})
+ } else if (item.attrType === 'INPUT_STR') {
+ rule.push({required: true, message: `${item.attrName}不能为空`, trigger: 'change'})
}
}
if (item.attrLen && item.attrType !== 'INPUT_NUM' && item.attrType !== 'DATE_PICKER' && item.attrType !== 'SEL_OPTION' && item.attrType !== 'SEL_OPTS' && item.attrType !== 'DATE_PIC_OPTS') {
- rule.push({type: 'string', max: item.attrLen, message: `${item.attrName}不能超过${item.attrLen}个字符`, trigger: 'change'})
+ rule.push({
+ type: 'string',
+ max: item.attrLen,
+ message: `${item.attrName}不能超过${item.attrLen}个字符`,
+ trigger: 'change'
+ })
}
if (rule.length > 0) {
rules[item.attrField] = rule
@@ -4361,7 +4407,7 @@ export default {
}
},
// 获取工作组信息下拉框信息
- getGzzOption () {
+ getGzzOption() {
this.$http.get('lawss/sarGroupMenu/queryGroup', '', {
_this: this
}, res => {
@@ -4377,7 +4423,7 @@ export default {
}
})
},
- getDept () {
+ getDept() {
return new Promise((resolve, reject) => {
let url = 'sys/org/getTree'
this.$http.get(url, {}, {
@@ -4416,12 +4462,12 @@ export default {
formatText(str) {
return formatText(str)
},
- onChecked () {
+ onChecked() {
this.sarStandardsInfoEO.FO = ''
this.sarStandardsInfoEO.XMPGJS = ''
},
// 编辑时文件上传成功更改标准状态
- fileSuccess (boolean) {
+ fileSuccess(boolean) {
// 判断当前是新增还是编辑
if (this.addOrUPdateFlag === 2) {
let sarStandardsInfoEO = this.sarStandardsInfoEO
@@ -4479,7 +4525,7 @@ export default {
},
computed: {
// 是否拥有拖拽权限
- hasPermissionDrag () {
+ hasPermissionDrag() {
let has = false
let permissionList = this.$store.getters.getMenuList
permissionList.map((menu) => {
@@ -4489,7 +4535,7 @@ export default {
})
return has
},
- addBtnDisabled () {
+ addBtnDisabled() {
if (this.selectSarMenu.id === 'wdsc' ||
this.selectSarMenu.id === 'gxhbq' ||
this.selectSarMenu.pId === 'gxhbq') {
@@ -4499,7 +4545,7 @@ export default {
}
}
},
- async mounted () {
+ async mounted() {
// 进入页面后查询树形结构目录
this.menuTreeLoading = true
await this.selectMenu()
@@ -4529,10 +4575,10 @@ export default {
this.categoryConfigOptions = res.data.CATEGORY
this.standAttributeList = res.data.RULETYPE
this.qcdwOptions = res.data.QCDW
- this.cysdOptions=res.data.WSCYSD;
- this.nylxOptions=res.data.NYLXCLASS;//能源类型
- this.syrzOptions=res.data.SYRZCLASS;//适用认证
- this.gkglbmOptions=res.data.GKGLBM;//归口管理部门
+ this.cysdOptions = res.data.WSCYSD;
+ this.nylxOptions = res.data.NYLXCLASS;//能源类型
+ this.syrzOptions = res.data.SYRZCLASS;//适用认证
+ this.gkglbmOptions = res.data.GKGLBM;//归口管理部门
this.getGzzOption()
this.setMap(this.standStateOptions)
@@ -4547,7 +4593,7 @@ export default {
this.busVsFunc()
this.modelFunc()
},
- destroyed () {
+ destroyed() {
this.allSelectOptions = {}
this.countryOptions = []
this.regionOptions = []
@@ -4571,176 +4617,203 @@ export default {
diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue
index 3b464f68c..d99ad7a3a 100644
--- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue
+++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue
@@ -1,402 +1,408 @@
-