清单发布流程

This commit is contained in:
宋伟佳
2021-07-05 11:13:32 +08:00
parent b034f75a74
commit 18de457ff2
17 changed files with 2318 additions and 388 deletions
@@ -21,113 +21,128 @@
</template>
<script>
import listOfCountries from "../accessStandardsAndRegulations/page/listOfCountries";
import listProject from "../accessStandardsAndRegulations/page/listProject";
import listTracking from "../accessStandardsAndRegulations/page/listTracking";
import listOther from "../accessStandardsAndRegulations/page/listOther";
export default {
name: "AccessStandardsAndRegulations",
data() {
return {
list: [],
tabValue: ''
};
},
methods: {},
components: {
listOfCountries,
listProject,
listTracking,
listOther
},
props: {},
computed: {},
watch: {},
mounted() {
var list = []
const menuList = this.$store.getters.getMenuList
menuList.forEach(item => {
if (item.id === 'b05b562950cb6d0aef539fad30b7386a') {
list.push({
label: '国家/地区清单',
name: 'listOfCountries'
})
} else if (item.id === '63e05705d0c8013162caa34f9fe52865') {
list.push({
label: '项目类清单',
name: 'listProject'
})
} else if (item.id === '418123d180abf67bd2c46d5a694baaa5') {
list.push({
label: '重点标准跟踪清单',
name: 'listTracking'
})
} else if (item.id === '5a75523729b04102a565167004d640e9') {
list.push({
label: '其他清单',
name: 'listOther'
})
import listOfCountries from "../accessStandardsAndRegulations/page/listOfCountries";
import listProject from "../accessStandardsAndRegulations/page/listProject";
import listTracking from "../accessStandardsAndRegulations/page/listTracking";
import listOther from "../accessStandardsAndRegulations/page/listOther";
export default {
name: "AccessStandardsAndRegulations",
data() {
return {
list: [],
tabValue: "",
menuName: ["国家/地区清单", "项目类清单", "重点标准跟踪清单", "其他清单"]
};
},
methods: {},
components: {
listOfCountries,
listProject,
listTracking,
listOther
},
props: {},
computed: {},
watch: {},
mounted() {
var list = [];
const menuList = this.$store.getters.getMenuList;
let menuData = [];
let menuID = ["b05b562950cb6d0aef539fad30b7386a", "63e05705d0c8013162caa34f9fe52865", "418123d180abf67bd2c46d5a694baaa5", "5a75523729b04102a565167004d640e9"];
this.menuName.forEach(item => {
for (let i = 0; i < menuList.length; i++) {
let entity = menuList[i];
if (item != entity.menuName) continue;
if (menuID.indexOf(entity.id) >= 0 && menuData.indexOf(entity.id) == -1) {
menuData.push(entity.id);
if (entity.id === "b05b562950cb6d0aef539fad30b7386a") {
list.push({
label: "国家/地区清单",
name: "listOfCountries"
});
continue;
} else if (entity.id === "63e05705d0c8013162caa34f9fe52865") {
list.push({
label: "项目类清单",
name: "listProject"
});
continue;
} else if (entity.id === "418123d180abf67bd2c46d5a694baaa5") {
list.push({
label: "重点标准跟踪清单",
name: "listTracking"
});
continue;
} else if (entity.id === "5a75523729b04102a565167004d640e9") {
list.push({
label: "其他清单",
name: "listOther"
});
continue;
}
}
})
this.list = list
this.tabValue = this.list[0].name
},
beforeRouteLeave(to, from, next) {
const toName = ['ListOfStandardsAndRegulationsDetails', 'Details', 'ProjectAddEit', 'OtherAddEit']
// 离开此页面之前,记录tabName以便返回使用,如果将要访问的页面不是这两个,则清空tabName
if (toName.includes(to.name)) {
this.$store.commit('SET_ACCESS_STANDARD_REG_TABS', this.tabValue)
} else {
this.$store.commit('SET_ACCESS_STANDARD_REG_TABS')
}
setTimeout(() => {
next()
}, 100)
},
beforeRouteEnter(to, from, next) {
next(vm => {
if (vm.$store.state.accessStandRegTabName !== '') {
vm.tabValue = vm.$store.state.accessStandRegTabName
}
})
});
this.list = list;
this.tabValue = this.list[0].name;
},
beforeRouteLeave(to, from, next) {
const toName = ["ListOfStandardsAndRegulationsDetails", "Details", "ProjectAddEit", "OtherAddEit"];
// 离开此页面之前,记录tabName以便返回使用,如果将要访问的页面不是这两个,则清空tabName
if (toName.includes(to.name)) {
this.$store.commit("SET_ACCESS_STANDARD_REG_TABS", this.tabValue);
} else {
this.$store.commit("SET_ACCESS_STANDARD_REG_TABS");
}
};
setTimeout(() => {
next();
}, 100);
},
beforeRouteEnter(to, from, next) {
next(vm => {
if (vm.$store.state.accessStandRegTabName !== "") {
vm.tabValue = vm.$store.state.accessStandRegTabName;
}
});
}
};
</script>
<style lang="less" scoped>
@import '~@/assets/styles/style';
@import '~@/assets/styles/mixins';
@import '~@/assets/styles/style';
@import '~@/assets/styles/mixins';
#accessStandardsAndRegulations {
height: 100%;
padding: 0 10px;
background: #fff;
#accessStandardsAndRegulations {
height: 100%;
padding: 0 10px;
background: #fff;
display: flex;
flex-direction: column;
/deep/ .el-tabs {
flex: auto;
display: flex;
flex-direction: column;
/deep/ .el-tabs {
/deep/ .el-tabs__header {
margin: 0 !important;
}
.el-tabs__content {
height: 100% !important;
flex: auto;
position: relative;
display: flex;
flex-direction: column;
/deep/ .el-tabs__header {
margin: 0 !important;
}
.el-tabs__content {
height: 100% !important;
.el-tab-pane {
height: 100%;
flex: auto;
position: relative;
display: flex;
flex-direction: column;
.el-tab-pane {
height: 100%;
flex: auto;
display: flex;
flex-direction: column;
}
}
}
}
}
</style>
@@ -42,7 +42,7 @@
class="common-button-primary add-button"
size="mini"
@click="openModal(null,'addOpt')"
v-btn-permission="'ae7419baca1564175bf96d94e827ef8b'"
v-btn-permission="''"
><i class="iconfont">&#xe84e;</i>新增
</el-button>
<el-button
@@ -16,6 +16,7 @@
placeholder="请输入清单名称"
></el-input>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
:loading="searching"
@@ -28,6 +28,24 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="适用领域" prop="applicationScope" class="search-item">
<el-select
v-model="sarAccessEO.applicationScope"
multiple
placeholder="请选择"
filterable
:disabled="disabledFlag"
class="wx-resolve"
>
<el-option
v-for="item in applyOptions"
:value="item.value"
:key="item.value"
:label="item.label"
>
</el-option>
</el-select>
</el-form-item>
<br/><br/>
<el-form-item label="清单说明" prop="remark" class="search-item max-search-item2">
<el-input
@@ -222,21 +240,18 @@
</el-table-column>
<el-table-column
prop="newPutTime"
width="150px"
sortable
label="新车型实施日期">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="prodPutTime"
width="150px"
sortable
label="在产车实施日期">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="ZRBMName"
width="150px"
label="责任部门">
</el-table-column>
<el-table-column
@@ -366,34 +381,29 @@
</el-table-column>
<el-table-column
prop="newPutTime"
width="190px"
label="发布日期"
sortable
>
</el-table-column>
<el-table-column
prop="newPutTime"
width="190px"
label="新车型实施日期"
sortable
>
</el-table-column>
<el-table-column
prop="prodPutTime"
width="190px"
label="在产车实施日期"
sortable
>
</el-table-column>
<el-table-column
prop="applyArcticId"
width="120px"
show-overflow-tooltip
label="适用车型">
</el-table-column>
<el-table-column
prop="applyArcticId"
width="120px"
show-overflow-tooltip
label="文本状态">
</el-table-column>
@@ -505,7 +515,8 @@ export default {
energyKind: '',
type: '',
relateFile: '',
remark: '' // 清单说明
remark: '', // 清单说明
applicationScope: '' //适用领域
},
fileInfoList: [], // 上传的附件
uploadFileListPath: 'api/att/attFile/upload', // 上传的地址
@@ -525,6 +536,7 @@ export default {
disabledFlag: false,
regionOptions: [], // 基础信息 区域list
drawerCountryOptions: [], // 基础信息 国家list
applyOptions: [], //基础信息适用领域list
applyArcticOptions: [], // 基础车型 适用车型list
energyKindOptions: [], // 能源种类list
accessSarTypeOptions: [], // 要求类型list
@@ -545,6 +557,7 @@ export default {
sarAccessInfoSearch: {
id: '',
countryArea: '', // 国家
applicationScope: '', //适用区域
keywords: '', // 关键字
detailedListName: '', //清单名称
applyArctic: '', // 能源种类
@@ -1453,6 +1466,7 @@ export default {
sarAccessEO.inforlist = JSON.stringify(rowlist)
sarAccessEO.adminInfoList = JSON.stringify(rowList2)
sarAccessEO.countryArea = sarAccessEO.countryArea.join(',')
sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',')
// 判断是否有附件
if (this.fileInfoList.length > 0) {
let relateFile = []
@@ -1500,7 +1514,6 @@ export default {
// 查询数据搜索 table 数据
selectLawsStands () {
if (this.isListType) {
console.log('1505');
this.$http.get('lawss/sarSarAccess/page', this.sarAccessInfoSearch, {
_this: this,
loading: 'dataLoading'
@@ -1514,6 +1527,7 @@ export default {
_this: this,
loading: 'dataLoading'
}, res => {
console.log(res.data);
res.data.list[0].list.map(item => {
item.newPutTextTime = null
item.prodPutTextTime = null
@@ -2214,6 +2228,7 @@ export default {
this.applyArcticOptions = res.data.PRODUCTTYPE || [] // 基础车型 适用车型list
this.energyKindOptions = res.data.ENERGYTYPES || [] // 能源种类list
this.drawerCountryOptions = res.data.COUNTRY // 国家、地区list
this.applyOptions = res.data.COUNTRY
this.standNatureOptions = res.data.SARPROPERTY // 新增 标准性质
this.accessSarTypeOptions = res.data.REQUESTTYPE // 数据搜索 要求类型
this.standSortOptions = res.data.STANDCLASSIFY // 标准类别
@@ -2228,9 +2243,11 @@ export default {
// 判断是否是编辑
if (this.$route.query.id) {
const accessRow = this.getAccessStandardRegRow
console.log('是否是编辑', accessRow);
this.$nextTick(() => {
this.sarAccessEO.type = accessRow.type
this.sarAccessEO.countryArea = accessRow.countryArea.split(',')
this.sarAccessEO.applicationScope = accessRow.applicationScope.split(',')
this.sarAccessEO.detailedListName = accessRow.detailedListName
this.sarAccessEO.id = accessRow.id
this.sarAccessEO.remark = accessRow.remark || ''
@@ -13,6 +13,24 @@
<el-form-item label="清单类别" prop="detailedList" class="search-item">
<el-input v-model="sarAccessEO.detailedList" :disabled="disabledFlag" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="适用领域" prop="applicationScope" class="search-item">
<el-select
v-model="sarAccessEO.applicationScope"
multiple
placeholder="请选择"
filterable
:disabled="disabledFlag"
class="wx-resolve"
>
<el-option
v-for="item in applyOptions"
:value="item.value"
:key="item.value"
:label="item.label"
>
</el-option>
</el-select>
</el-form-item>
<br/><br/>
<el-form-item label="清单说明" prop="remark" class="search-item max-search-item2">
<el-input
@@ -292,11 +310,11 @@
<el-button
class="common-button-default export-button"
size="mini" @click="exportAccessInfo('apart')"
v-btn-permission="'98c9556f5ae1590b4c2eb7d8ae2526dd'"
v-btn-permission="''"
><i class="iconfont">&#xe6e9;</i>导出</el-button>
<el-button
class="common-button-default delete-button"
v-btn-permission="'c998c341816ecade73493fca3051cb1e'"
v-btn-permission="''"
size="mini" @click="deleteSelectSarAccessInfo"
v-if="!disabledFlag"
><i class="iconfont">&#xe61b;</i>删除</el-button>
@@ -490,8 +508,10 @@ export default {
energyKind: '',
type: '',
relateFile: '',
remark: '' // 清单说明
remark: '' ,// 清单说明
applicationScope: '' , //适用领域
},
applyOptions: [], //适用领域list
fileInfoList: [], // 上传的附件
uploadFileListPath: 'api/att/attFile/upload', // 上传的地址
// 新增、编辑 基础信息验证条件
@@ -2185,6 +2205,7 @@ export default {
this.applyArcticOptions = res.data.PRODUCTTYPE || [] // 基础车型 适用车型list
this.energyKindOptions = res.data.ENERGYTYPES || [] // 能源种类list
this.drawerCountryOptions = res.data.COUNTRY // 国家、地区list
this.applyOptions = res.data.COUNTRY //适用领域 list
this.standNatureOptions = res.data.SARPROPERTY // 新增 标准性质
this.accessSarTypeOptions = res.data.REQUESTTYPE // 数据搜索 要求类型
this.standSortOptions = res.data.STANDCLASSIFY // 标准类别
@@ -13,6 +13,24 @@
<el-form-item label="项目名称" prop="projectName" class="search-item">
<el-input v-model="sarAccessEO.projectName" :disabled="disabledFlag" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="适用领域" prop="applicationScope" class="search-item">
<el-select
v-model="sarAccessEO.applicationScope"
multiple
placeholder="请选择"
filterable
:disabled="disabledFlag"
class="wx-resolve"
>
<el-option
v-for="item in applyOptions"
:value="item.value"
:key="item.value"
:label="item.label"
>
</el-option>
</el-select>
</el-form-item>
<br/><br/>
<el-form-item label="清单说明" prop="remark" class="search-item max-search-item2">
<el-input
@@ -490,9 +508,11 @@ export default {
energyKind: '',
type: '',
relateFile: '',
remark: '' // 清单说明
remark: '' ,// 清单说明
applicationScope: '', //适用领域
},
fileInfoList: [], // 上传的附件
applyOptions:[], //适用领域
uploadFileListPath: 'api/att/attFile/upload', // 上传的地址
// 新增、编辑 基础信息验证条件
sarAccessEORules: {
@@ -2185,7 +2205,7 @@ export default {
this.regionOptions = res.data.REGION // 基础信息 区域list
this.applyArcticOptions = res.data.PRODUCTTYPE || [] // 基础车型 适用车型list
this.energyKindOptions = res.data.ENERGYTYPES || [] // 能源种类list
this.drawerCountryOptions = res.data.COUNTRY // 国家、地区list
this.applyOptions = res.data.COUNTRY // 国家、地区list
this.standNatureOptions = res.data.SARPROPERTY // 新增 标准性质
this.accessSarTypeOptions = res.data.REQUESTTYPE // 数据搜索 要求类型
this.standSortOptions = res.data.STANDCLASSIFY // 标准类别