修改bug
This commit is contained in:
+31
-20
@@ -84,7 +84,7 @@
|
|||||||
align="center">
|
align="center">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="countryArea"
|
prop="countryAreaShow"
|
||||||
label="国家/地区"
|
label="国家/地区"
|
||||||
align="center">
|
align="center">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -114,7 +114,8 @@
|
|||||||
align="center">
|
align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span
|
<span
|
||||||
v-if="scope.row.detailedListVision != null && scope.row.detailedListVision !== ''">{{ scope.row.detailedListVision
|
v-if="scope.row.detailedListVision != null && scope.row.detailedListVision !== ''">{{
|
||||||
|
scope.row.detailedListVision
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -123,7 +124,10 @@
|
|||||||
label="更新时间"
|
label="更新时间"
|
||||||
align="center">
|
align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>{{ scope.row.updateTime ? $moment(scope.row.updateTime).format('YYYY-MM-DD') : scope.row.updateTime }}</div>
|
<div>{{
|
||||||
|
scope.row.updateTime ? $moment(scope.row.updateTime).format('YYYY-MM-DD') : scope.row.updateTime
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -137,11 +141,14 @@
|
|||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<i class="iconfont"></i>
|
<i class="iconfont"></i>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item :command="[scope.row, '查看']" v-btn-permission="'b736f2469d49b3214cc8087419a24b60'">查看
|
<el-dropdown-item :command="[scope.row, '查看']" v-btn-permission="'b736f2469d49b3214cc8087419a24b60'">
|
||||||
|
查看
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'4733577057bf2470fc5c1f88d81eaf1d'">编辑
|
<el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'4733577057bf2470fc5c1f88d81eaf1d'">
|
||||||
|
编辑
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="'ff411226afb759fd2f4a2798ceac322a'">删除
|
<el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="'ff411226afb759fd2f4a2798ceac322a'">
|
||||||
|
删除
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -190,14 +197,14 @@ export default {
|
|||||||
drawerTotal: 0, // 抽屉分页的总条数
|
drawerTotal: 0, // 抽屉分页的总条数
|
||||||
sarAccessEORules: {
|
sarAccessEORules: {
|
||||||
region: [
|
region: [
|
||||||
{ required: true, message: "区域不能为空", trigger: "change" }
|
{required: true, message: "区域不能为空", trigger: "change"}
|
||||||
],
|
],
|
||||||
country: [
|
country: [
|
||||||
{ required: true, message: "国家不能为空", trigger: "change" }
|
{required: true, message: "国家不能为空", trigger: "change"}
|
||||||
],
|
],
|
||||||
detailedListName: [
|
detailedListName: [
|
||||||
{ required: true, message: "清单名称不能为空", trigger: "blur" },
|
{required: true, message: "清单名称不能为空", trigger: "blur"},
|
||||||
{ type: "string", max: 100, message: "清单名称不能超过100个字符", trigger: "blur" }
|
{type: "string", max: 100, message: "清单名称不能超过100个字符", trigger: "blur"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
countryOptions: [],
|
countryOptions: [],
|
||||||
@@ -216,10 +223,10 @@ export default {
|
|||||||
applyAuth: "" // 认证类型
|
applyAuth: "" // 认证类型
|
||||||
},
|
},
|
||||||
dataSourceOptions: [
|
dataSourceOptions: [
|
||||||
{ value: "INLAND_STAND", label: "国内标准法规" },
|
{value: "INLAND_STAND", label: "国内标准法规"},
|
||||||
{ value: "FOREIGN_STAND", label: "海外标准法规" },
|
{value: "FOREIGN_STAND", label: "海外标准法规"},
|
||||||
{ value: "FOREIGN_LAWS", label: "国内外政策" },
|
{value: "FOREIGN_LAWS", label: "国内外政策"},
|
||||||
{ value: "BUSINESS", label: "企业标准 " }
|
{value: "BUSINESS", label: "企业标准 "}
|
||||||
],
|
],
|
||||||
tableLoading: true,
|
tableLoading: true,
|
||||||
sarAccessInfoSearchList: [],
|
sarAccessInfoSearchList: [],
|
||||||
@@ -260,24 +267,27 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
_this: this
|
_this: this
|
||||||
}, res => {
|
}, res => {
|
||||||
this.sarAccessListDatas = res.data.records
|
let arr = res.data.records;
|
||||||
this.sarAccessListDatas.forEach(item => {
|
console.log('271', arr)
|
||||||
|
arr.forEach(item => {
|
||||||
// 国家地区转换
|
// 国家地区转换
|
||||||
if (item.countryArea !== null || item.countryArea !== "") {
|
if (item.countryArea !== null || item.countryArea !== "") {
|
||||||
let k = (item.countryArea || "").split(',')
|
let k = (item.countryArea || "").split(',')
|
||||||
for (let i in this.countryOptions) {
|
for (let i in this.countryOptions) {
|
||||||
for (let m = 0; m< k.length; m++) {
|
for (let m = 0; m < k.length; m++) {
|
||||||
if (this.countryOptions[i].value === k[m]) {
|
if (this.countryOptions[i].value === k[m]) {
|
||||||
k[m] = this.countryOptions[i].label
|
k[m] = this.countryOptions[i].label
|
||||||
}
|
}
|
||||||
item.countryArea = k.join(',')
|
item.countryAreaShow = k.join(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
console.log('286',arr)
|
||||||
|
this.sarAccessListDatas = arr
|
||||||
|
this.tableLoading = false
|
||||||
this.sarSarAccessEOSearch.page = 1
|
this.sarSarAccessEOSearch.page = 1
|
||||||
this.sarAccessListTotal = res.data.total
|
this.sarAccessListTotal = res.data.total
|
||||||
this.tableLoading = false
|
|
||||||
}, e => {
|
}, e => {
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -360,7 +370,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 将文本状态的id与name对应
|
// 将文本状态的id与name对应
|
||||||
setMap(data){
|
setMap(data) {
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
this.$set(this.countryAreaMap, item.value, item.label)
|
this.$set(this.countryAreaMap, item.value, item.label)
|
||||||
})
|
})
|
||||||
@@ -400,6 +410,7 @@ export default {
|
|||||||
flex: auto;
|
flex: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 110px) !important;
|
height: calc(100% - 110px) !important;
|
||||||
|
|
||||||
.pagination {
|
.pagination {
|
||||||
position: static;
|
position: static;
|
||||||
|
|
||||||
|
|||||||
@@ -1360,12 +1360,12 @@ export default {
|
|||||||
loading: 'loadData'
|
loading: 'loadData'
|
||||||
}, res => {
|
}, res => {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
//this.$message.success('编辑成功')
|
if(res.message === '修改成功'){
|
||||||
this.isNext = true
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'AccessStandardsAndRegulations'
|
name: 'AccessStandardsAndRegulations'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, e => {
|
}, e => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2051,7 +2051,7 @@ export default {
|
|||||||
//this.sarAccessEO.countryArea = accessRow.countryArea.split(',')
|
//this.sarAccessEO.countryArea = accessRow.countryArea.split(',')
|
||||||
// this.sarAccessEO.applicationScope = accessRow.applicationScope.split(',')
|
// this.sarAccessEO.applicationScope = accessRow.applicationScope.split(',')
|
||||||
this.sarAccessEO.detailedListName = accessRow.detailedListName
|
this.sarAccessEO.detailedListName = accessRow.detailedListName
|
||||||
this.sarAccessEO.projectName = accessRow.projectName
|
this.sarAccessEO.carType = accessRow.carType
|
||||||
this.sarAccessEO.id = accessRow.id
|
this.sarAccessEO.id = accessRow.id
|
||||||
this.sarAccessEO.remark = accessRow.remark || ''
|
this.sarAccessEO.remark = accessRow.remark || ''
|
||||||
this.sarAccessEO.relateFile = accessRow.relateFile
|
this.sarAccessEO.relateFile = accessRow.relateFile
|
||||||
|
|||||||
@@ -700,72 +700,69 @@ export default {
|
|||||||
this.standModel = false;
|
this.standModel = false;
|
||||||
},
|
},
|
||||||
//添加标准确定事件
|
//添加标准确定事件
|
||||||
// this.detailedListModel = false
|
okStand(){
|
||||||
// this.standModel = false
|
if(this.standList.length > 0){
|
||||||
// okStand(){
|
this.standList.forEach(item => {
|
||||||
// console.log(this.dataList);
|
let addIndex
|
||||||
// if(this.standList.length < 1){
|
addIndex = this.dataList.findIndex(items => {
|
||||||
// this.$message.warning('请至少选择一条数据进行添加')
|
return items.standId === item.id
|
||||||
// }else{
|
|
||||||
// this.standList.map(item => {
|
|
||||||
// let addIndex;
|
|
||||||
// addIndex = this.dataList.findIndex(items => {
|
|
||||||
// return items.standId == item.id
|
|
||||||
// })
|
|
||||||
// console.log(addIndex);
|
|
||||||
// if(addIndex > -1){
|
|
||||||
// this.$message.warning('请勿重复添加数据')
|
|
||||||
// }else{
|
|
||||||
// this.dataList.push(item)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
okStand() {
|
|
||||||
let _this = this;
|
|
||||||
if (this.standList.length < 1) {
|
|
||||||
_this.$message.warning("请选择标准");
|
|
||||||
} else {
|
|
||||||
for (let i = 0; i < this.dataList.length; i++) {
|
|
||||||
let newStand = false;
|
|
||||||
for (let j = 0; j < this.standList.length; j++) {
|
|
||||||
if (this.standList[j].id == this.dataList[i].standId) {
|
|
||||||
newStand = true;
|
|
||||||
this.standList.splice(j, 1)
|
|
||||||
j--
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (newStand) {
|
|
||||||
_this.$message.warning("请勿重复添加数据");
|
|
||||||
} else {
|
|
||||||
// _this.dataList.push(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.standardData = []
|
|
||||||
_this.standModel = false;
|
|
||||||
for (var i = 0; i < this.standList.length; i++) {
|
|
||||||
this.standList1.push({
|
|
||||||
standId: this.standList[i].id,
|
|
||||||
projectId: this.localProEO.id
|
|
||||||
})
|
})
|
||||||
|
if(addIndex > -1){
|
||||||
|
this.$message.warning('请勿重复添加数据')
|
||||||
|
}else{
|
||||||
|
this.dataList.push(item)
|
||||||
}
|
}
|
||||||
if (this.standList1 != '') {
|
})
|
||||||
this.$http.postData("sarStandProjectLibrary/batchInsert", this.standList1, {
|
this.detailedListModel = false
|
||||||
_this: this
|
this.standModel = false
|
||||||
}, res => {
|
}else{
|
||||||
if (res.ok) {
|
this.$message.warning('请至少选择一条数据进行添加')
|
||||||
// this.$message.success(res.message)
|
|
||||||
this.getDataList()
|
|
||||||
}
|
|
||||||
}, e => {
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.standList = []
|
|
||||||
this.standList1 = []
|
|
||||||
_this.standModel = false;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// okStand() {
|
||||||
|
// let _this = this;
|
||||||
|
// if (this.standList.length < 1) {
|
||||||
|
// _this.$message.warning("请选择标准");
|
||||||
|
// } else {
|
||||||
|
// for (let i = 0; i < this.dataList.length; i++) {
|
||||||
|
// let newStand = false;
|
||||||
|
// for (let j = 0; j < this.standList.length; j++) {
|
||||||
|
// if (this.standList[j].id == this.dataList[i].standId) {
|
||||||
|
// newStand = true;
|
||||||
|
// this.standList.splice(j, 1)
|
||||||
|
// j--
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (newStand) {
|
||||||
|
// _this.$message.warning("请勿重复添加数据");
|
||||||
|
// } else {
|
||||||
|
// // _this.dataList.push(item);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// this.standardData = []
|
||||||
|
// _this.standModel = false;
|
||||||
|
// for (var i = 0; i < this.standList.length; i++) {
|
||||||
|
// this.standList1.push({
|
||||||
|
// standId: this.standList[i].id,
|
||||||
|
// projectId: this.localProEO.id
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// if (this.standList1 != '') {
|
||||||
|
// this.$http.postData("sarStandProjectLibrary/batchInsert", this.standList1, {
|
||||||
|
// _this: this
|
||||||
|
// }, res => {
|
||||||
|
// if (res.ok) {
|
||||||
|
// // this.$message.success(res.message)
|
||||||
|
// this.getDataList()
|
||||||
|
// }
|
||||||
|
// }, e => {
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// this.standList = []
|
||||||
|
// this.standList1 = []
|
||||||
|
// _this.standModel = false;
|
||||||
|
// }
|
||||||
|
// },
|
||||||
//获取标准
|
//获取标准
|
||||||
getStandrd(data){
|
getStandrd(data){
|
||||||
this.detailedId = data.id
|
this.detailedId = data.id
|
||||||
|
|||||||
Reference in New Issue
Block a user