修改bug
This commit is contained in:
+90
-79
@@ -6,42 +6,42 @@
|
|||||||
<el-form :modal="sarSarAccessEOSearch" :inline="true" class="label-input-form">
|
<el-form :modal="sarSarAccessEOSearch" :inline="true" class="label-input-form">
|
||||||
<el-form-item label="国家/地区" class="search-item search-item-last">
|
<el-form-item label="国家/地区" class="search-item search-item-last">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="sarSarAccessEOSearch.countryArea"
|
v-model="sarSarAccessEOSearch.countryArea"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
filterable
|
filterable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in countryOptions"
|
v-for="item in countryOptions"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="清单名称" class="search-item search-item-last">
|
<el-form-item label="清单名称" class="search-item search-item-last">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="sarSarAccessEOSearch.detailedListName"
|
v-model="sarSarAccessEOSearch.detailedListName"
|
||||||
placeholder="请输入清单名称"
|
placeholder="请输入清单名称"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="search-item btn-box">
|
<el-form-item class="search-item btn-box">
|
||||||
<el-button
|
<el-button
|
||||||
:loading="searching"
|
:loading="searching"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="common-button-primary"
|
class="common-button-primary"
|
||||||
size="small"
|
size="small"
|
||||||
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
|
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
|
||||||
@click="searchSarAccess">
|
@click="searchSarAccess">
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="search-item btn-box">
|
<el-form-item class="search-item btn-box">
|
||||||
<el-button
|
<el-button
|
||||||
class="common-button-default"
|
class="common-button-default"
|
||||||
size="small"
|
size="small"
|
||||||
v-btn-permission="'3480a13964a18e000196e4d5bc6ef117'"
|
v-btn-permission="'3480a13964a18e000196e4d5bc6ef117'"
|
||||||
@click="clearSearch">清空
|
@click="clearSearch">清空
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -49,59 +49,59 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="action-bar">
|
<div class="action-bar">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
class="common-button-primary add-button"
|
class="common-button-primary add-button"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="openModal(null,'addOpt')"
|
@click="openModal(null,'addOpt')"
|
||||||
v-btn-permission="'7aaf236bdf6b1657c615380f7f34b8a8'"
|
v-btn-permission="'7aaf236bdf6b1657c615380f7f34b8a8'"
|
||||||
><i class="iconfont"></i>新增
|
><i class="iconfont"></i>新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
class="common-button-default delete-button"
|
class="common-button-default delete-button"
|
||||||
:loading="delLoading"
|
:loading="delLoading"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="deleteSarAccess('demore',null)"
|
@click="deleteSarAccess('demore',null)"
|
||||||
v-btn-permission="'562e58cc3a960096cf3321e631293dc9'"
|
v-btn-permission="'562e58cc3a960096cf3321e631293dc9'"
|
||||||
><i class="iconfont"></i>批量删除
|
><i class="iconfont"></i>批量删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<loading :loading="tableLoading">数据获取中</loading>
|
<loading :loading="tableLoading">数据获取中</loading>
|
||||||
<el-table
|
<el-table
|
||||||
:data="sarAccessListDatas"
|
:data="sarAccessListDatas"
|
||||||
tooltip-effect="dark"
|
tooltip-effect="dark"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
border
|
border
|
||||||
height="100%"
|
height="100%"
|
||||||
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
||||||
fontWeight: 'bold', height: '48px'}"
|
fontWeight: 'bold', height: '48px'}"
|
||||||
@selection-change="selectOne"
|
@selection-change="selectOne"
|
||||||
ref="selection"
|
ref="selection"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
width="55"
|
width="55"
|
||||||
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>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="detailedListName"
|
prop="detailedListName"
|
||||||
label="清单名称"
|
label="清单名称"
|
||||||
align="center"
|
align="center"
|
||||||
width="260px"
|
width="260px"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<a class="table-jump" @click.stop="showTable(scope.row)">{{ scope.row.detailedListName }}</a>
|
<a class="table-jump" @click.stop="showTable(scope.row)">{{ scope.row.detailedListName }}</a>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="detailedListState"
|
prop="detailedListState"
|
||||||
label="清单状态"
|
label="清单状态"
|
||||||
align="center">
|
align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.detailedListState === '0'">未发布</span>
|
<span v-if="scope.row.detailedListState === '0'">未发布</span>
|
||||||
<span v-if="scope.row.detailedListState === '1'">已发布</span>
|
<span v-if="scope.row.detailedListState === '1'">已发布</span>
|
||||||
@@ -109,27 +109,31 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="detailedListVision"
|
prop="detailedListVision"
|
||||||
label="清单版本"
|
label="清单版本"
|
||||||
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>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="updateTime"
|
prop="updateTime"
|
||||||
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
|
||||||
prop="updatePeople"
|
prop="updatePeople"
|
||||||
label="更新人"
|
label="更新人"
|
||||||
align="center">
|
align="center">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="50" fixed="right">
|
<el-table-column label="操作" align="center" width="50" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -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,11 +1360,11 @@ 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 => {
|
if(addIndex > -1){
|
||||||
// let addIndex;
|
this.$message.warning('请勿重复添加数据')
|
||||||
// addIndex = this.dataList.findIndex(items => {
|
}else{
|
||||||
// return items.standId == item.id
|
this.dataList.push(item)
|
||||||
// })
|
}
|
||||||
// console.log(addIndex);
|
})
|
||||||
// if(addIndex > -1){
|
this.detailedListModel = false
|
||||||
// this.$message.warning('请勿重复添加数据')
|
this.standModel = false
|
||||||
// }else{
|
}else{
|
||||||
// this.dataList.push(item)
|
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){
|
getStandrd(data){
|
||||||
this.detailedId = data.id
|
this.detailedId = data.id
|
||||||
|
|||||||
Reference in New Issue
Block a user