修改bug
This commit is contained in:
+90
-79
@@ -6,42 +6,42 @@
|
||||
<el-form :modal="sarSarAccessEOSearch" :inline="true" class="label-input-form">
|
||||
<el-form-item label="国家/地区" class="search-item search-item-last">
|
||||
<el-select
|
||||
v-model="sarSarAccessEOSearch.countryArea"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
v-model="sarSarAccessEOSearch.countryArea"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in countryOptions"
|
||||
:value="item.value"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
v-for="item in countryOptions"
|
||||
:value="item.value"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="清单名称" class="search-item search-item-last">
|
||||
<el-input
|
||||
v-model="sarSarAccessEOSearch.detailedListName"
|
||||
placeholder="请输入清单名称"
|
||||
v-model="sarSarAccessEOSearch.detailedListName"
|
||||
placeholder="请输入清单名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="search-item btn-box">
|
||||
<el-button
|
||||
:loading="searching"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
size="small"
|
||||
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
|
||||
@click="searchSarAccess">
|
||||
:loading="searching"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
size="small"
|
||||
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
|
||||
@click="searchSarAccess">
|
||||
查询
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item class="search-item btn-box">
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
size="small"
|
||||
v-btn-permission="'3480a13964a18e000196e4d5bc6ef117'"
|
||||
@click="clearSearch">清空
|
||||
class="common-button-default"
|
||||
size="small"
|
||||
v-btn-permission="'3480a13964a18e000196e4d5bc6ef117'"
|
||||
@click="clearSearch">清空
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -49,59 +49,59 @@
|
||||
</div>
|
||||
<div class="action-bar">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="common-button-primary add-button"
|
||||
size="mini"
|
||||
@click="openModal(null,'addOpt')"
|
||||
v-btn-permission="'7aaf236bdf6b1657c615380f7f34b8a8'"
|
||||
type="primary"
|
||||
class="common-button-primary add-button"
|
||||
size="mini"
|
||||
@click="openModal(null,'addOpt')"
|
||||
v-btn-permission="'7aaf236bdf6b1657c615380f7f34b8a8'"
|
||||
><i class="iconfont"></i>新增
|
||||
</el-button>
|
||||
<el-button
|
||||
class="common-button-default delete-button"
|
||||
:loading="delLoading"
|
||||
size="mini"
|
||||
@click="deleteSarAccess('demore',null)"
|
||||
v-btn-permission="'562e58cc3a960096cf3321e631293dc9'"
|
||||
class="common-button-default delete-button"
|
||||
:loading="delLoading"
|
||||
size="mini"
|
||||
@click="deleteSarAccess('demore',null)"
|
||||
v-btn-permission="'562e58cc3a960096cf3321e631293dc9'"
|
||||
><i class="iconfont"></i>批量删除
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="container">
|
||||
<loading :loading="tableLoading">数据获取中</loading>
|
||||
<el-table
|
||||
:data="sarAccessListDatas"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
border
|
||||
height="100%"
|
||||
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
||||
:data="sarAccessListDatas"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
border
|
||||
height="100%"
|
||||
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
||||
fontWeight: 'bold', height: '48px'}"
|
||||
@selection-change="selectOne"
|
||||
ref="selection"
|
||||
@selection-change="selectOne"
|
||||
ref="selection"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center">
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="countryArea"
|
||||
label="国家/地区"
|
||||
align="center">
|
||||
prop="countryAreaShow"
|
||||
label="国家/地区"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="detailedListName"
|
||||
label="清单名称"
|
||||
align="center"
|
||||
width="260px"
|
||||
prop="detailedListName"
|
||||
label="清单名称"
|
||||
align="center"
|
||||
width="260px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a class="table-jump" @click.stop="showTable(scope.row)">{{ scope.row.detailedListName }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="detailedListState"
|
||||
label="清单状态"
|
||||
align="center">
|
||||
prop="detailedListState"
|
||||
label="清单状态"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.detailedListState === '0'">未发布</span>
|
||||
<span v-if="scope.row.detailedListState === '1'">已发布</span>
|
||||
@@ -109,27 +109,31 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="detailedListVision"
|
||||
label="清单版本"
|
||||
align="center">
|
||||
prop="detailedListVision"
|
||||
label="清单版本"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="updateTime"
|
||||
label="更新时间"
|
||||
align="center">
|
||||
prop="updateTime"
|
||||
label="更新时间"
|
||||
align="center">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="updatePeople"
|
||||
label="更新人"
|
||||
align="center">
|
||||
prop="updatePeople"
|
||||
label="更新人"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="50" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
@@ -137,11 +141,14 @@
|
||||
<el-dropdown trigger="click" @command="handleCommand">
|
||||
<i class="iconfont"></i>
|
||||
<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 :command="[scope.row, '编辑']" v-btn-permission="'4733577057bf2470fc5c1f88d81eaf1d'">编辑
|
||||
<el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'4733577057bf2470fc5c1f88d81eaf1d'">
|
||||
编辑
|
||||
</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-menu>
|
||||
</el-dropdown>
|
||||
@@ -190,14 +197,14 @@ export default {
|
||||
drawerTotal: 0, // 抽屉分页的总条数
|
||||
sarAccessEORules: {
|
||||
region: [
|
||||
{ required: true, message: "区域不能为空", trigger: "change" }
|
||||
{required: true, message: "区域不能为空", trigger: "change"}
|
||||
],
|
||||
country: [
|
||||
{ required: true, message: "国家不能为空", trigger: "change" }
|
||||
{required: true, message: "国家不能为空", trigger: "change"}
|
||||
],
|
||||
detailedListName: [
|
||||
{ required: true, message: "清单名称不能为空", trigger: "blur" },
|
||||
{ type: "string", max: 100, message: "清单名称不能超过100个字符", trigger: "blur" }
|
||||
{required: true, message: "清单名称不能为空", trigger: "blur"},
|
||||
{type: "string", max: 100, message: "清单名称不能超过100个字符", trigger: "blur"}
|
||||
]
|
||||
},
|
||||
countryOptions: [],
|
||||
@@ -216,10 +223,10 @@ export default {
|
||||
applyAuth: "" // 认证类型
|
||||
},
|
||||
dataSourceOptions: [
|
||||
{ value: "INLAND_STAND", label: "国内标准法规" },
|
||||
{ value: "FOREIGN_STAND", label: "海外标准法规" },
|
||||
{ value: "FOREIGN_LAWS", label: "国内外政策" },
|
||||
{ value: "BUSINESS", label: "企业标准 " }
|
||||
{value: "INLAND_STAND", label: "国内标准法规"},
|
||||
{value: "FOREIGN_STAND", label: "海外标准法规"},
|
||||
{value: "FOREIGN_LAWS", label: "国内外政策"},
|
||||
{value: "BUSINESS", label: "企业标准 "}
|
||||
],
|
||||
tableLoading: true,
|
||||
sarAccessInfoSearchList: [],
|
||||
@@ -260,24 +267,27 @@ export default {
|
||||
}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.sarAccessListDatas = res.data.records
|
||||
this.sarAccessListDatas.forEach(item => {
|
||||
let arr = res.data.records;
|
||||
console.log('271', arr)
|
||||
arr.forEach(item => {
|
||||
// 国家地区转换
|
||||
if (item.countryArea !== null || item.countryArea !== "") {
|
||||
let k = (item.countryArea || "").split(',')
|
||||
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]) {
|
||||
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.sarAccessListTotal = res.data.total
|
||||
this.tableLoading = false
|
||||
}, e => {
|
||||
|
||||
});
|
||||
@@ -360,7 +370,7 @@ export default {
|
||||
});
|
||||
},
|
||||
// 将文本状态的id与name对应
|
||||
setMap(data){
|
||||
setMap(data) {
|
||||
data.forEach(item => {
|
||||
this.$set(this.countryAreaMap, item.value, item.label)
|
||||
})
|
||||
@@ -400,6 +410,7 @@ export default {
|
||||
flex: auto;
|
||||
width: 100%;
|
||||
height: calc(100% - 110px) !important;
|
||||
|
||||
.pagination {
|
||||
position: static;
|
||||
|
||||
|
||||
@@ -1360,11 +1360,11 @@ export default {
|
||||
loading: 'loadData'
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
//this.$message.success('编辑成功')
|
||||
this.isNext = true
|
||||
this.$router.push({
|
||||
name: 'AccessStandardsAndRegulations'
|
||||
})
|
||||
if(res.message === '修改成功'){
|
||||
this.$router.push({
|
||||
name: 'AccessStandardsAndRegulations'
|
||||
})
|
||||
}
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
|
||||
+1
-1
@@ -2051,7 +2051,7 @@ export default {
|
||||
//this.sarAccessEO.countryArea = accessRow.countryArea.split(',')
|
||||
// this.sarAccessEO.applicationScope = accessRow.applicationScope.split(',')
|
||||
this.sarAccessEO.detailedListName = accessRow.detailedListName
|
||||
this.sarAccessEO.projectName = accessRow.projectName
|
||||
this.sarAccessEO.carType = accessRow.carType
|
||||
this.sarAccessEO.id = accessRow.id
|
||||
this.sarAccessEO.remark = accessRow.remark || ''
|
||||
this.sarAccessEO.relateFile = accessRow.relateFile
|
||||
|
||||
@@ -700,72 +700,69 @@ export default {
|
||||
this.standModel = false;
|
||||
},
|
||||
//添加标准确定事件
|
||||
// this.detailedListModel = false
|
||||
// this.standModel = false
|
||||
// okStand(){
|
||||
// console.log(this.dataList);
|
||||
// if(this.standList.length < 1){
|
||||
// this.$message.warning('请至少选择一条数据进行添加')
|
||||
// }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(){
|
||||
if(this.standList.length > 0){
|
||||
this.standList.forEach(item => {
|
||||
let addIndex
|
||||
addIndex = this.dataList.findIndex(items => {
|
||||
return items.standId === item.id
|
||||
})
|
||||
if(addIndex > -1){
|
||||
this.$message.warning('请勿重复添加数据')
|
||||
}else{
|
||||
this.dataList.push(item)
|
||||
}
|
||||
})
|
||||
this.detailedListModel = false
|
||||
this.standModel = false
|
||||
}else{
|
||||
this.$message.warning('请至少选择一条数据进行添加')
|
||||
}
|
||||
},
|
||||
// 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;
|
||||
// }
|
||||
// },
|
||||
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){
|
||||
this.detailedId = data.id
|
||||
|
||||
Reference in New Issue
Block a user