From 6307c6270b97b0fa30a15ca9a4497ee563ba4451 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com>
Date: Thu, 9 Sep 2021 11:17:32 +0800
Subject: [PATCH] commit
---
.../page/listOfCountries.vue | 200 +++++++++---------
.../domesticStandardsAndRegulations/index.vue | 11 +-
2 files changed, 108 insertions(+), 103 deletions(-)
diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/page/listOfCountries.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/page/listOfCountries.vue
index 79cce7720..dbe4ba403 100644
--- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/page/listOfCountries.vue
+++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/page/listOfCountries.vue
@@ -6,42 +6,42 @@
+ :loading="searching"
+ type="primary"
+ class="common-button-primary"
+ size="small"
+ v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
+ @click="searchSarAccess">
查询
清空
+ class="common-button-default"
+ size="small"
+ v-btn-permission="'3480a13964a18e000196e4d5bc6ef117'"
+ @click="clearSearch">清空
@@ -49,59 +49,59 @@
新增
批量删除
数据获取中
+ type="selection"
+ width="55"
+ align="center">
+ prop="countryAreaShow"
+ label="国家/地区"
+ align="center">
{{ scope.row.detailedListName }}
+ prop="detailedListState"
+ label="清单状态"
+ align="center">
未发布
已发布
@@ -109,31 +109,31 @@
+ prop="detailedListVision"
+ label="清单版本"
+ align="center">
{{
+ v-if="scope.row.detailedListVision != null && scope.row.detailedListVision !== ''">{{
scope.row.detailedListVision
}}
+ prop="updateTime"
+ label="更新时间"
+ align="center">
{{
- scope.row.updateTime ? $moment(scope.row.updateTime).format('YYYY-MM-DD') : scope.row.updateTime
+ scope.row.updateTime ? $moment(scope.row.updateTime).format("YYYY-MM-DD") : scope.row.updateTime
}}
+ prop="updatePeople"
+ label="更新人"
+ align="center">
@@ -186,7 +186,7 @@ export default {
selectedList: [],
// 新增、编辑 准入信息字段
sarAccessEO: {
- relateFile: '',
+ relateFile: "",
country: "",
applyArctic: "",
energyKind: "",
@@ -197,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: [],
@@ -223,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: [],
@@ -263,29 +263,29 @@ export default {
sortKey: 1,
page: 1,
pageSize: 10,
- ...this.sarSarAccessEOSearch,
+ ...this.sarSarAccessEOSearch
}, {
_this: this
}, res => {
let arr = res.data.records;
+ let map = new Map();
+ this.countryOptions.forEach(item => {
+ map.set(item.value, item.label);
+ });
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++) {
- if (this.countryOptions[i].value === k[m]) {
- k[m] = this.countryOptions[i].label
- }
- item.countryAreaShow = k.join(',')
- }
+ let k = (item.countryArea || "").split(",");
+ for (let m = 0; m < k.length; m++) {
+ k[m] = map.get(k[m]);
+ item.countryAreaShow = k.join(",");
}
}
- })
- this.sarAccessListDatas = arr
- this.tableLoading = false
- this.sarSarAccessEOSearch.page = 1
- this.sarAccessListTotal = res.data.total
+ });
+ this.tableLoading = false;
+ this.sarAccessListDatas = arr;
+ this.sarSarAccessEOSearch.page = 1;
+ this.sarAccessListTotal = res.data.total;
}, e => {
});
@@ -299,8 +299,8 @@ export default {
// this.searchSarAccess();
},
clearSearch() {
- this.sarSarAccessEOSearch.countryArea = ''
- this.sarSarAccessEOSearch.detailedListName = ''
+ this.sarSarAccessEOSearch.countryArea = "";
+ this.sarSarAccessEOSearch.detailedListName = "";
// this.searchSarAccess();
},
// 新增相关
@@ -311,29 +311,29 @@ export default {
},
// 批量删除
deleteSarAccess(flag, id) {
- if (flag === 'delOne') {
+ if (flag === "delOne") {
this.selectedList = [];
this.selectedList[0] = id;
}
if (this.selectedList.length === 0) {
- this.$message.warning('请选择要删除的数据')
+ this.$message.warning("请选择要删除的数据");
} else {
- this.$confirm('确定删除这些数据?', '提示', {
- confirmButtonText: '确定',
- confirmButtonClass: 'common-button-primary',
- cancelButtonText: '取消',
- type: 'warning',
+ this.$confirm("确定删除这些数据?", "提示", {
+ confirmButtonText: "确定",
+ confirmButtonClass: "common-button-primary",
+ cancelButtonText: "取消",
+ type: "warning"
}).then(() => {
- const URL = `sarLawsDetailedList/sar-laws-detailed-list/deleteListAll?idList=${this.selectedList.join(',')}`
+ const URL = `sarLawsDetailedList/sar-laws-detailed-list/deleteListAll?idList=${this.selectedList.join(",")}`;
this.$http.postDelete(URL, {}, res => {
this.searchSarAccess();
this.selectedList = [];
- this.$message.success('删除成功')
+ this.$message.success("删除成功");
}, e => {
});
}).catch(() => {
- })
+ });
}
},
// 表格选择框
@@ -356,7 +356,7 @@ export default {
},
// 点击 table编辑按钮 事件
editTable(item) {
- this.$store.commit('SET_ACCESS_STAND_REG_ROW', item)
+ this.$store.commit("SET_ACCESS_STAND_REG_ROW", item);
this.$router.push({
name: "ListOfStandardsAndRegulationsDetails",
query: {
@@ -370,8 +370,8 @@ export default {
// 将文本状态的id与name对应
setMap(data) {
data.forEach(item => {
- this.$set(this.countryAreaMap, item.value, item.label)
- })
+ this.$set(this.countryAreaMap, item.value, item.label);
+ });
}
},
created() {
@@ -385,7 +385,7 @@ export default {
_this: this
}, res => {
this.countryOptions = res.data.COUNTRY;
- this.setMap(this.countryOptions)
+ this.setMap(this.countryOptions);
}, e => {
});
}
diff --git a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue
index 8f6ff8ccc..4775b0d1f 100644
--- a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue
+++ b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue
@@ -24,8 +24,7 @@
@mouseleave="mouseleave(data)">
- {{ node.label}}
- {{ node.label.substring(0,15)+'...'}}
+ {{ node.label }}
-