Merge branch 'develop' into 'test'

Develop

See merge request !93
This commit is contained in:
王夏晖
2021-08-19 06:52:34 +00:00
4 changed files with 752 additions and 406 deletions
@@ -425,7 +425,7 @@
<div v-show="!isMoreAwayBtn" class="more" @click="moreClick">更多<img src="@/assets/images/shangqi/img/more.png"> <div v-show="!isMoreAwayBtn" class="more" @click="moreClick">更多<img src="@/assets/images/shangqi/img/more.png">
</div> </div>
<!-- <div v-show="isMoreAwayBtn" class="put-away" @click="putAwayClick">收起<img src="@/assets/images/shangqi/img/more.png"></div>--> <!-- <div v-show="isMoreAwayBtn" class="put-away" @click="putAwayClick">收起<img src="@/assets/images/shangqi/img/more.png"></div>-->
<!--查看标准条款列表--> <!--查看分解单-->
<el-drawer <el-drawer
title="查看分解单" title="查看分解单"
:wrapperClosable="false" :wrapperClosable="false"
@@ -819,9 +819,9 @@
<div class="see-drawer-div"> <div class="see-drawer-div">
<label class="see-drawer-name" title="解读内容">解读内容</label> <label class="see-drawer-name" title="解读内容">解读内容</label>
<span class="see-drawer-val" <span class="see-drawer-val"
:title="standShowItemEO.interpretationContent ? standShowItemEO.interpretationContent.replace(/<.*?>/ig, ' ') : ''"> :title="standShowItemEO.readContent ? standShowItemEO.readContent.replace(/<.*?>/ig, ' ') : ''">
{{ {{
standShowItemEO.interpretationContent ? standShowItemEO.interpretationContent.replace(/<.*?>/ig, ' ') : '' standShowItemEO.readContent ? standShowItemEO.readContent.replace(/<.*?>/ig, ' ') : ''
}}</span> }}</span>
</div> </div>
@@ -1251,6 +1251,7 @@ export default {
knowIdList: '', knowIdList: '',
total7: 0, total7: 0,
page7: 1, page7: 1,
pageSize7: this.$store.getters.userInfo.configContent,
addForm: { addForm: {
title: '', title: '',
content: '', content: '',
@@ -2331,12 +2332,15 @@ export default {
selectSarStandItems(id, flag) { selectSarStandItems(id, flag) {
this.standItemSearch.standId = this.sarStandardsInfoEO.id this.standItemSearch.standId = this.sarStandardsInfoEO.id
this.standItemSearch.fileType = this.fileType this.standItemSearch.fileType = this.fileType
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', this.standItemSearch, {}, res => { this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
...this.standItemSearch,
pageSize: this.pageSize7, page: this.page7,
}, {}, res => {
this.selectedItemList = [] this.selectedItemList = []
if (res.ok) { if (res.ok) {
this.standItemList = res.data; this.standItemList = res.data.list;
console.log(res.data); console.log(res.data);
this.total7 = res.data.length // 分页需要 this.total7 = res.data.count // 分页需要
} }
}, e => { }, e => {
}) })
@@ -6,7 +6,8 @@
<el-divider content-position="left">基础信息</el-divider> <el-divider content-position="left">基础信息</el-divider>
<div class="search-area"> <div class="search-area">
<div class="left"> <div class="left">
<el-form inline :model="sarAccessEO" ref="sarAccessForm" class="label-input-form" :rules="sarAccessEORules" label-width="80px"> <el-form inline :model="sarAccessEO" ref="sarAccessForm" class="label-input-form" :rules="sarAccessEORules"
label-width="80px">
<el-form-item label="清单名称" prop="detailedListName" class="search-item"> <el-form-item label="清单名称" prop="detailedListName" class="search-item">
<el-input v-model="sarAccessEO.detailedListName" :disabled="disabledFlag" placeholder="请输入"></el-input> <el-input v-model="sarAccessEO.detailedListName" :disabled="disabledFlag" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
@@ -100,14 +101,17 @@
<el-button <el-button
class="common-button-default" class="common-button-default"
size="small" size="small"
@click="clearSearchLaws">清空</el-button> @click="clearSearchLaws">清空
</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" v-if="showSelectBox" class="common-button-primary" size="mini" @click="selectMoreBtn"> <el-button type="primary" v-if="showSelectBox" class="common-button-primary" size="mini"
@click="selectMoreBtn">
<i class="iconfont">&#xe7a5;</i> <i class="iconfont">&#xe7a5;</i>
高级查询 高级查询
</el-button> </el-button>
<el-button type="primary" v-if="!showSelectBox" class="common-button-primary" size="mini" @click="selectMoreBtn"> <el-button type="primary" v-if="!showSelectBox" class="common-button-primary" size="mini"
@click="selectMoreBtn">
<i class="iconfont">&#xe7a5;</i> <i class="iconfont">&#xe7a5;</i>
高级查询 高级查询
</el-button> </el-button>
@@ -141,18 +145,21 @@
<div class="action-bar"> <div class="action-bar">
<el-button <el-button
class="common-button-default" class="common-button-default"
size="mini" @click="addSarAccess">添加</el-button> size="mini" @click="addSarAccess">添加
</el-button>
<el-button <el-button
class="common-button-default" class="common-button-default"
v-if="showTableFlag" v-if="showTableFlag"
size="mini" @click="isShowTable" size="mini" @click="isShowTable"
>{{$t('m.showAddDataList')}}</el-button> >{{ $t('m.showAddDataList') }}
</el-button>
<el-button <el-button
class="common-button-default" class="common-button-default"
v-if="!showTableFlag" v-if="!showTableFlag"
size="mini" size="mini"
@click="isShowTable" @click="isShowTable"
>{{$t('m.hideAddDataList')}}</el-button> >{{ $t('m.hideAddDataList') }}
</el-button>
</div> </div>
<div class="standards-drawer-table standards-drawer-table-one" v-if="!showTableFlag"> <div class="standards-drawer-table standards-drawer-table-one" v-if="!showTableFlag">
<el-table <el-table
@@ -245,13 +252,15 @@
class="common-button-default export-button" class="common-button-default export-button"
size="mini" @click="exportAccessInfo('apart')" size="mini" @click="exportAccessInfo('apart')"
v-btn-permission="''" v-btn-permission="''"
><i class="iconfont">&#xe6e9;</i>导出</el-button> ><i class="iconfont">&#xe6e9;</i>导出
</el-button>
<el-button <el-button
class="common-button-default delete-button" class="common-button-default delete-button"
size="mini" @click="deleteSelectSarAccessInfo" size="mini" @click="deleteSelectSarAccessInfo"
v-if="!disabledFlag" v-if="!disabledFlag"
v-btn-permission="''" v-btn-permission="''"
><i class="iconfont">&#xe61b;</i>删除</el-button> ><i class="iconfont">&#xe61b;</i>删除
</el-button>
</div> </div>
<!-- 清单条目的列表页 --> <!-- 清单条目的列表页 -->
<el-table <el-table
@@ -395,26 +404,33 @@
type="primary" type="primary"
size="small" @click="moveUp(scope.$index, scope.row)" size="small" @click="moveUp(scope.$index, scope.row)"
v-if="!disabledFlag" v-if="!disabledFlag"
>上移</el-button> >上移
</el-button>
<el-button <el-button
class="common-button-default" class="common-button-default"
type="danger" type="danger"
size="small" @click="moveDown(scope.$index, scope.row)" size="small" @click="moveDown(scope.$index, scope.row)"
v-if="!disabledFlag" v-if="!disabledFlag"
>下移</el-button> >下移
</el-button>
<el-button <el-button
size="small" size="small"
@click="editTghisRow(scope.row)" @click="editTghisRow(scope.row)"
class="common-button-default" class="common-button-default"
type="warning" type="warning"
>编辑</el-button> >编辑
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="footer"> <div class="footer">
<el-button class="common-button-primary" icon="el-icon-check" size="mini" type="primary" @click="saveSarAccess" v-if="!disabledFlag" :loading="loadData">{{$t('m.submit')}}</el-button> <el-button class="common-button-primary" icon="el-icon-check" size="mini" type="primary" @click="saveSarAccess"
<el-button class="common-button-default" icon="el-icon-close" size="mini" @click="backCancal" v-if="!disabledFlag">{{$t('m.cancel')}}</el-button> v-if="!disabledFlag" :loading="loadData">{{ $t('m.submit') }}
</el-button>
<el-button class="common-button-default" icon="el-icon-close" size="mini" @click="backCancal"
v-if="!disabledFlag">{{ $t('m.cancel') }}
</el-button>
</div> </div>
<el-dialog :visible.sync="exportTestItemNameFlag" title="导出文件" width="300px"> <el-dialog :visible.sync="exportTestItemNameFlag" title="导出文件" width="300px">
<el-form :inline="true" class="label-input-form search-area"> <el-form :inline="true" class="label-input-form search-area">
@@ -424,7 +440,8 @@
</el-form> </el-form>
<span slot="footer" class="demo-drawer-footer"> <span slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancal">取消</el-button> <el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancal">取消</el-button>
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" @click="exportTestItem">提交</el-button> <el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check"
@click="exportTestItem">提交</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!--导入模态框--> <!--导入模态框-->
@@ -517,14 +534,16 @@
size="mini" size="mini"
icon="el-icon-check" icon="el-icon-check"
@click="saveInfo" @click="saveInfo"
>提交</el-button >提交
</el-button
> >
<el-button <el-button
size="mini" size="mini"
icon="el-icon-close" icon="el-icon-close"
class="common-button-default" class="common-button-default"
@click="cancelInfo" @click="cancelInfo"
>取消</el-button >取消
</el-button
> >
</div> </div>
</el-drawer> </el-drawer>
@@ -553,6 +572,7 @@ import stand from "../../../config/pages/attributeCustom/components/stand";
import {mapGetters} from 'vuex' import {mapGetters} from 'vuex'
import {dicTypeData, StandardsInfoPage} from '@/api/unqualProcess' import {dicTypeData, StandardsInfoPage} from '@/api/unqualProcess'
import {interfaceUrl} from "@/sysConfig"; import {interfaceUrl} from "@/sysConfig";
export default { export default {
name: 'ListOfStandardsAndRegulationsDetails', name: 'ListOfStandardsAndRegulationsDetails',
components: { components: {
@@ -1229,7 +1249,8 @@ export default {
}) })
this.sarAccessInfoListArry = [] this.sarAccessInfoListArry = []
this.$refs.entryTable.clearSelection() this.$refs.entryTable.clearSelection()
}).catch(() => {}) }).catch(() => {
})
} else { } else {
this.$message.error('请选择需要删除的清单条目!') this.$message.error('请选择需要删除的清单条目!')
} }
@@ -1296,11 +1317,11 @@ export default {
// 新增 // 新增
sarAccessEO.state = '1' sarAccessEO.state = '1'
sarAccessEO.version = 0 sarAccessEO.version = 0
if (this.sarAccessInfoList.length !== 0) {
this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, { this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
_this: this, _this: this,
loading: 'loadData' loading: 'loadData'
}, res => { }, res => {
if (this.sarAccessInfoList.length !== 0) {
if (res.ok) { if (res.ok) {
if (res.data === "数据库为空,添加成功") { if (res.data === "数据库为空,添加成功") {
this.$message.success('新增成功') this.$message.success('新增成功')
@@ -1308,15 +1329,7 @@ export default {
this.$router.push({ this.$router.push({
name: 'AccessStandardsAndRegulations' name: 'AccessStandardsAndRegulations'
}) })
} } else if (res.data === "车型类别清单添加成功") {
else if (res.data === "其他清单添加成功"){
this.$message.success('新增成功')
this.isNext = true
this.$router.push({
name: 'AccessStandardsAndRegulations'
})
}
else if (res.data === "车型类别清单添加成功"){
this.$message.success('新增成功') this.$message.success('新增成功')
this.isNext = true this.isNext = true
this.$router.push({ this.$router.push({
@@ -1324,8 +1337,7 @@ export default {
}) })
} else if (res.data === "车型类别清单添加失败") { } else if (res.data === "车型类别清单添加失败") {
this.$message.error('已存在此车型类别清单,新增失败') this.$message.error('已存在此车型类别清单,新增失败')
} } else if (res.data === "国家/地区清单添加成功") {
else if (res.data === "国家/地区清单添加成功"){
this.$message.success('新增成功') this.$message.success('新增成功')
this.isNext = true this.isNext = true
this.$router.push({ this.$router.push({
@@ -1334,13 +1346,13 @@ export default {
} else if (res.data === "国家/地区清单添加失败") { } else if (res.data === "国家/地区清单添加失败") {
this.$message.error('已存在此国家/地区清单,新增失败') this.$message.error('已存在此国家/地区清单,新增失败')
} }
} }
}, e => {
console.log(e)
})
} else { } else {
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)') this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
} }
}, e => {
})
} else { } else {
// 编辑 // 编辑
this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, { this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
@@ -1362,6 +1374,120 @@ export default {
} }
}) })
}, },
// saveSarAccess () {
// this.$refs['sarAccessForm'].validate((valid) => {
// if (valid) {
// let rowlist = []
// let rowlist1 = []
// let rowlist2 = []
// let rowlist3 = []
// for (let i = 0; i < this.sarAccessInfoList.length; i++) {
// rowlist.push(this.sarAccessInfoList[i].id)
// if (this.sarAccessInfoList[i].ssrq === null) {
// rowlist1.push(this.sarAccessInfoList[i].ssrq = '-')
// }else {
// rowlist1.push(this.sarAccessInfoList[i].ssrq.toString())
// }
// if (this.sarAccessInfoList[i].xcxssrqgj === null) {
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-')
// }else {
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString())
// }
// if (this.sarAccessInfoList[i].zccssrqgj === null) {
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-')
// }else {
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString())
// }
// }
// rowlist = rowlist.join(',')
// rowlist1 = rowlist1.join(',')
// rowlist2 = rowlist2.join(',')
// rowlist3 = rowlist3.join(',')
// let sarAccessEO = JSON.parse(JSON.stringify(this.sarAccessEO))
// sarAccessEO.inforlist = rowlist
// sarAccessEO.inforlist1 = rowlist1
// sarAccessEO.inforlist2 = rowlist2
// sarAccessEO.inforlist3 = rowlist3
// sarAccessEO.countryArea = sarAccessEO.countryArea.join(',')
// // sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',')
// // 判断是否有附件
// if (this.fileInfoList.length > 0) {
// let relateFile = []
// this.fileInfoList.map(item => {
// relateFile.push(item.id)
// })
// sarAccessEO.fileIds = relateFile.join(',')
// }
// if (!sarAccessEO.id) {
// // 新增
// sarAccessEO.state = '1'
// sarAccessEO.version = 0
// this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
// _this: this,
// loading: 'loadData'
// }, res => {
// if (this.sarAccessInfoList.length !== 0) {
// if (res.ok) {
// if (res.data === "数据库为空,添加成功"){
// this.$message.success('新增成功')
// this.isNext = true
// this.$router.push({
// name: 'AccessStandardsAndRegulations'
// })
// }
// else if (res.data === "其他清单添加成功"){
// this.$message.success('新增成功')
// this.isNext = true
// this.$router.push({
// name: 'AccessStandardsAndRegulations'
// })
// }
// else if (res.data === "车型类别清单添加成功"){
// this.$message.success('新增成功')
// this.isNext = true
// this.$router.push({
// name: 'AccessStandardsAndRegulations'
// })
// }else if(res.data === "车型类别清单添加失败"){
// this.$message.error('已存在此车型类别清单,新增失败')
// }
// else if (res.data === "国家/地区清单添加成功"){
// this.$message.success('新增成功')
// this.isNext = true
// this.$router.push({
// name: 'AccessStandardsAndRegulations'
// })
// }else if(res.data === "国家/地区清单添加失败"){
// this.$message.error('已存在此国家/地区清单,新增失败')
// }
//
// }
// } else {
// this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
// }
// }, e => {
// })
// } else {
// // 编辑
// this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
// _this: this,
// loading: 'loadData'
// }, res => {
// if (res.ok) {
// //this.$message.success('编辑成功')
// this.isNext = true
// this.$router.push({
// name: 'AccessStandardsAndRegulations'
// })
// }
// }, e => {
// })
// }
// }else {
// this.$message.error('请检查表单是否填写正确')
// }
// })
// },
pageInfo() { pageInfo() {
StandardsInfoPage(this.sarAccessInfoSearch).then(res => { StandardsInfoPage(this.sarAccessInfoSearch).then(res => {
this.sarAccessInfoSearchList = res.data.list this.sarAccessInfoSearchList = res.data.list
@@ -1755,7 +1881,8 @@ export default {
this.isSubmit = false this.isSubmit = false
this.$message.warning('标准编号已存在') this.$message.warning('标准编号已存在')
} }
}, e => {}) }, e => {
})
} else { } else {
this.isSubmit = false this.isSubmit = false
this.$message({ this.$message({
@@ -2125,6 +2252,7 @@ export default {
height: calc(~'100% - 50px'); height: calc(~'100% - 50px');
background: #ffffff; background: #ffffff;
overflow-y: auto; overflow-y: auto;
.basic-information { .basic-information {
& > .search-area { & > .search-area {
& > .left { & > .left {
@@ -2132,9 +2260,11 @@ export default {
} }
} }
} }
.basic-information, .data-search, .list-entry { .basic-information, .data-search, .list-entry {
padding-top: 0.1px; padding-top: 0.1px;
background: #ffffff; background: #ffffff;
.el-divider { .el-divider {
.el-divider__text { .el-divider__text {
color: #409EFF; color: #409EFF;
@@ -2142,9 +2272,11 @@ export default {
} }
} }
} }
.showSelectBox { .showSelectBox {
padding: 10px; padding: 10px;
} }
.data-search { .data-search {
.standards-drawer-table-one { .standards-drawer-table-one {
position: relative; position: relative;
@@ -2152,11 +2284,13 @@ export default {
height: 356px; height: 356px;
} }
} }
.list-entry { .list-entry {
.el-tabs { .el-tabs {
padding: 0 10px; padding: 0 10px;
} }
} }
.footer { .footer {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
@@ -2168,32 +2302,39 @@ export default {
text-align: right; text-align: right;
} }
} }
.labelBox { .labelBox {
/deep/ .el-form-item__label { /deep/ .el-form-item__label {
padding-right: 5px; padding-right: 5px;
padding-left: 15px; padding-left: 15px;
} }
} }
.labelBox1 { .labelBox1 {
/deep/ .el-form-item__label { /deep/ .el-form-item__label {
padding-right: 5px; padding-right: 5px;
} }
} }
.un-select { .un-select {
user-select: none; user-select: none;
} }
::v-deep .el-drawer__header { ::v-deep .el-drawer__header {
& > span:first-child { & > span:first-child {
outline: none !important; outline: none !important;
} }
} }
::v-deep .el-drawer { ::v-deep .el-drawer {
outline: none !important; outline: none !important;
} }
/deep/ .wx-resolve { /deep/ .wx-resolve {
.el-select__tags { .el-select__tags {
padding: 4px; padding: 4px;
} }
.el-tag { .el-tag {
margin: 2px; margin: 2px;
} }
@@ -1264,27 +1264,38 @@ export default {
}) })
sarAccessEO.fileIds = relateFile.join(',') sarAccessEO.fileIds = relateFile.join(',')
} }
if (!sarAccessEO.id) { if (!sarAccessEO.id) {
// 新增 // 新增
sarAccessEO.state = '1' sarAccessEO.state = '1'
sarAccessEO.version = 0 sarAccessEO.version = 0
if (this.sarAccessInfoList.length !== 0) {
this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, { this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
_this: this, _this: this,
loading: 'loadData' loading: 'loadData'
}, res => { }, res => {
if (this.sarAccessInfoList.length !== 0) {
if (res.ok) { if (res.ok) {
if (res.data === "数据库为空,添加成功") {
this.$message.success('新增成功')
this.isNext = true
this.$router.push({
name: 'AccessStandardsAndRegulations'
})
} else if (res.data === "其他清单添加成功") {
this.$message.success('新增成功') this.$message.success('新增成功')
this.isNext = true this.isNext = true
this.$router.push({ this.$router.push({
name: 'AccessStandardsAndRegulations' name: 'AccessStandardsAndRegulations'
}) })
} }
}
}, e => {
console.log(e)
})
} else { } else {
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)') this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
} }
}, e => {
})
} else { } else {
// 编辑 // 编辑
this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, { this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
@@ -1305,6 +1316,92 @@ export default {
} }
}) })
}, },
// 提交按钮 事件
// saveSarAccess () {
// this.$refs['sarAccessForm'].validate((valid) => {
// if (valid) {
// let rowlist = []
// let rowlist1 = []
// let rowlist2 = []
// let rowlist3 = []
// for (let i = 0; i < this.sarAccessInfoList.length; i++) {
// rowlist.push(this.sarAccessInfoList[i].id)
// if (this.sarAccessInfoList[i].ssrq === null) {
// rowlist1.push(this.sarAccessInfoList[i].ssrq = '-')
// }else {
// rowlist1.push(this.sarAccessInfoList[i].ssrq.toString())
// }
// if (this.sarAccessInfoList[i].xcxssrqgj === null) {
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-')
// }else {
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString())
// }
// if (this.sarAccessInfoList[i].zccssrqgj === null) {
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-')
// }else {
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString())
// }
// }
// rowlist = rowlist.join(',')
// rowlist1 = rowlist1.join(',')
// rowlist2 = rowlist2.join(',')
// rowlist3 = rowlist3.join(',')
// let sarAccessEO = JSON.parse(JSON.stringify(this.sarAccessEO))
// sarAccessEO.inforlist = rowlist
// sarAccessEO.inforlist1 = rowlist1
// sarAccessEO.inforlist2 = rowlist2
// sarAccessEO.inforlist3 = rowlist3
// // sarAccessEO.countryArea = sarAccessEO.countryArea.join(',')
// // sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',')
// // 判断是否有附件
// if (this.fileInfoList.length > 0) {
// let relateFile = []
// this.fileInfoList.map(item => {
// relateFile.push(item.id)
// })
// sarAccessEO.fileIds = relateFile.join(',')
// }
// if (!sarAccessEO.id) {
// // 新增
// sarAccessEO.state = '1'
// sarAccessEO.version = 0
// this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
// _this: this,
// loading: 'loadData'
// }, res => {
// if (this.sarAccessInfoList.length !== 0) {
// if (res.ok) {
// this.$message.success('新增成功')
// this.isNext = true
// this.$router.push({
// name: 'AccessStandardsAndRegulations'
// })
// }
// }else {
// this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
// }
// }, e => {
// })
// } else {
// // 编辑
// this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
// _this: this,
// loading: 'loadData'
// }, res => {
// if (res.ok) {
// this.isNext = true
// this.$router.push({
// name: 'AccessStandardsAndRegulations'
// })
// }
// }, e => {
// })
// }
// }else {
// this.$message.error('请检查表单是否填写正确')
// }
// })
// },
pageInfo() { pageInfo() {
StandardsInfoPage(this.sarAccessInfoSearch).then(res =>{ StandardsInfoPage(this.sarAccessInfoSearch).then(res =>{
this.sarAccessInfoSearchList = res.data.list this.sarAccessInfoSearchList = res.data.list
@@ -1246,27 +1246,42 @@ export default {
// 新增 // 新增
sarAccessEO.state = '1' sarAccessEO.state = '1'
sarAccessEO.version = 0 sarAccessEO.version = 0
if (this.sarAccessInfoList.length !== 0) {
this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, { this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
_this: this, _this: this,
loading: 'loadData' loading: 'loadData'
}, res => { }, res => {
if (this.sarAccessInfoList.length !== 0) {
if (res.ok) { if (res.ok) {
if (res.data === "车型类别清单添加成功") { if (res.data === "数据库为空,添加成功") {
this.$message.success('新增成功') this.$message.success('新增成功')
this.isNext = true this.isNext = true
this.$router.push({ this.$router.push({
name: 'AccessStandardsAndRegulations' name: 'AccessStandardsAndRegulations'
}) })
}else{ } else if (res.data === "车型类别清单添加成功") {
this.$message.success('新增成功')
this.isNext = true
this.$router.push({
name: 'AccessStandardsAndRegulations'
})
} else if (res.data === "车型类别清单添加失败") {
this.$message.error('已存在此车型类别清单,新增失败') this.$message.error('已存在此车型类别清单,新增失败')
} else if (res.data === "国家/地区清单添加成功") {
this.$message.success('新增成功')
this.isNext = true
this.$router.push({
name: 'AccessStandardsAndRegulations'
})
} else if (res.data === "国家/地区清单添加失败") {
this.$message.error('已存在此国家/地区清单,新增失败')
} }
} }
}, e => {
console.log(e)
})
} else { } else {
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)') this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
} }
}, e => {
})
} else { } else {
// 编辑 // 编辑
this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, { this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
@@ -1287,6 +1302,95 @@ export default {
} }
}) })
}, },
// saveSarAccess () {
// this.$refs['sarAccessForm'].validate((valid) => {
// if (valid) {
// let rowlist = []
// let rowlist1 = []
// let rowlist2 = []
// let rowlist3 = []
// for (let i = 0; i < this.sarAccessInfoList.length; i++) {
// rowlist.push(this.sarAccessInfoList[i].id)
// if (this.sarAccessInfoList[i].ssrq === null) {
// rowlist1.push(this.sarAccessInfoList[i].ssrq = '-')
// }else {
// rowlist1.push(this.sarAccessInfoList[i].ssrq.toString())
// }
// if (this.sarAccessInfoList[i].xcxssrqgj === null) {
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-')
// }else {
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString())
// }
// if (this.sarAccessInfoList[i].zccssrqgj === null) {
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-')
// }else {
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString())
// }
// }
// rowlist = rowlist.join(',')
// rowlist1 = rowlist1.join(',')
// rowlist2 = rowlist2.join(',')
// rowlist3 = rowlist3.join(',')
// let sarAccessEO = JSON.parse(JSON.stringify(this.sarAccessEO))
// sarAccessEO.inforlist = rowlist
// sarAccessEO.inforlist1 = rowlist1
// sarAccessEO.inforlist2 = rowlist2
// sarAccessEO.inforlist3 = rowlist3
// // sarAccessEO.countryArea = sarAccessEO.countryArea.join(',')
// // sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',')
// // 判断是否有附件
// if (this.fileInfoList.length > 0) {
// let relateFile = []
// this.fileInfoList.map(item => {
// relateFile.push(item.id)
// })
// sarAccessEO.fileIds = relateFile.join(',')
// }
// if (!sarAccessEO.id) {
// // 新增
// sarAccessEO.state = '1'
// sarAccessEO.version = 0
// this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
// _this: this,
// loading: 'loadData'
// }, res => {
// if (this.sarAccessInfoList.length !== 0) {
// if (res.ok) {
// if (res.data === "车型类别清单添加成功") {
// this.$message.success('新增成功')
// this.isNext = true
// this.$router.push({
// name: 'AccessStandardsAndRegulations'
// })
// }else{
// this.$message.error('已存在此车型类别清单,新增失败')
// }
// }
// }else {
// this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
// }
// }, e => {
// })
// } else {
// // 编辑
// this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
// _this: this,
// loading: 'loadData'
// }, res => {
// if (res.ok) {
// this.isNext = true
// this.$router.push({
// name: 'AccessStandardsAndRegulations'
// })
// }
// }, e => {
// })
// }
// }else {
// this.$message.error('请检查表单是否填写正确')
// }
// })
// },
// 字段转化 // 字段转化
changeText(val) { changeText(val) {
val.forEach(item => { val.forEach(item => {