修改需求

This commit is contained in:
宋伟佳
2021-08-13 10:56:46 +08:00
parent 13ae0d0f01
commit 03f3f76389
3 changed files with 285 additions and 90 deletions
@@ -445,7 +445,7 @@ export default {
}, },
//获取项目数据 //获取项目数据
getProjectData() { getProjectData() {
this.$http.get("sarStandProjectLibrary/queryProject", { this.$http.get("sarStandProjectLibrary/queryProjectWorkFlow", {
...this.projectSearch ...this.projectSearch
}, { }, {
_this: this _this: this
@@ -520,12 +520,7 @@ export default {
{ {
_this: this _this: this
}, res => { }, res => {
if (!res.data.length) {
this.dataList = []
this.$message.warning("请选择带有分解单的标准");
} else {
this.listForm.breakdownList = res.data; this.listForm.breakdownList = res.data;
}
}); });
}, },
//标准的多选框改变 //标准的多选框改变
@@ -501,7 +501,6 @@ export default {
} }
}) })
}, e => { }, e => {
}); });
}, },
selectInfoMore() { selectInfoMore() {
@@ -39,7 +39,7 @@
</div> </div>
</el-card> </el-card>
<div class="action-bar"> <div class="action-bar">
<el-button plain class="common-button-primary" v-btn-permission="''" size="mini" @click="addList">调取</el-button> <el-button plain class="common-button-primary" v-btn-permission="''" size="mini" @click="transfer">调取</el-button>
<el-button plain class="common-button-primary" v-btn-permission="''" size="mini" @click="deleteList">批量删除 <el-button plain class="common-button-primary" v-btn-permission="''" size="mini" @click="deleteList">批量删除
</el-button> </el-button>
<el-button class="common-button-default export-button" <el-button class="common-button-default export-button"
@@ -174,9 +174,144 @@
<!-- 调取弹窗 --> <!-- 调取弹窗 -->
<el-drawer <el-drawer
title="调取" title="调取"
:visible.sync="standModel" :visible.sync="detailedListModel"
size="900px" size="900px"
custom-class="demo-drawer" custom-class="demo-drawer"
>
<div class="demo-drawer-content">
<div style="position: absolute;bottom: 48px;top:16px;left: 0;right: 0">
<div style="position: absolute;bottom: 55px;top: 0;right: 0;left: 0">
<!-- 顶部工具栏 -->
<table-tools-bar>
<div slot="left">
<div class="search-area">
<el-form :modal="sarSarAccessEOSearch" :inline="true" class="label-input-form">
<el-form-item label="车型类别" class="search-item search-item-last">
<el-input
v-model="sarSarAccessEOSearch.projectName"
placeholder="请输入车型类别"
></el-input>
</el-form-item>
<el-form-item label="清单名称" class="search-item search-item-last">
<el-input
v-model="sarSarAccessEOSearch.detailedListName"
placeholder="请输入清单名称"
></el-input>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
type="primary"
class="common-button-primary"
size="small"
@click="searchSarAccess">
查询
</el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
size="small"
@click="clearSearchAccess">清空
</el-button>
</el-form-item>
</el-form>
</div>
</div>
</table-tools-bar>
<el-table
: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"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="projectName"
label="车型类别"
align="center">
</el-table-column>
<el-table-column
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">
<template slot-scope="scope">
<span v-if="scope.row.detailedListState === '0'">未发布</span>
<span v-if="scope.row.detailedListState === '1'">已发布</span>
<span v-if="scope.row.detailedListState === '3'">审核中</span>
</template>
</el-table-column>
<el-table-column
prop="detailedListVision"
label="清单版本"
align="center">
<template slot-scope="scope">
<span
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">
<template slot-scope="scope">
<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">
</el-table-column>
<el-table-column
label="操作"
align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="getStandrd(scope.row)">获取标准</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
:page="pageNo"
:pageSize="pageSizeNo"
:total="totalNo"
@pageChange="pageChangeNo"
@pageSizeChange="pageSizeChangeNo"
style="position: absolute;"
/>
</div>
</div>
<div class="demo-drawer-footer">
<el-button size="mini" @click="cancelDetailed">取消</el-button>
</div>
</el-drawer>
<!-- 获取标准弹窗 -->
<el-drawer
title="获取标准"
:visible.sync="standModel"
size="900px"
custom-class="demo-drawer"
> >
<div class="demo-drawer-content"> <div class="demo-drawer-content">
<div style="position: absolute;bottom: 48px;top:16px;left: 0;right: 0"> <div style="position: absolute;bottom: 48px;top:16px;left: 0;right: 0">
@@ -204,16 +339,15 @@
</el-formItem> </el-formItem>
<el-formItem class="search-item btn-box"> <el-formItem class="search-item btn-box">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
class="common-button-primary" class="common-button-primary"
@click="search">查询
@click="search">查询
</el-button> </el-button>
<el-button <el-button
class="common-button-default" class="common-button-default"
size="mini" size="mini"
@click="clearSearch">清空 @click="clearSearch">清空
</el-button> </el-button>
</el-formItem> </el-formItem>
</el-form> </el-form>
@@ -221,24 +355,24 @@
</div> </div>
</table-tools-bar> </table-tools-bar>
<el-table <el-table
:data="standardData" :data="standardData"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
border border
ref="table" ref="table"
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="selectThree" @selection-change="selectThree"
> >
<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="code" prop="code"
label="标准号"> label="标准号">
<template slot-scope="scope"> <template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump" <a v-if="scope.row.standYear" class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{ @click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{
@@ -249,8 +383,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="standName" prop="standName"
label="标准名称" label="标准名称"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<a class="table-jump" <a class="table-jump"
@@ -258,36 +392,28 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="issueTime" prop="issueTime"
label="发布日期"> label="发布日期">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="xcxssrq" prop="xcxssrqgj"
label="新车型实施日期"> label="新车型实施日期">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px"> <span>{{ scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format('YYYY-MM-DD') : '' }}</span>
{{
scope.row.attrInfoCaseMap.xcxssrq ? $moment(scope.row.attrInfoCaseMap.xcxssrq).format('YYYY-MM-DD') : '-'
}}
</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
prop="zccssrq" prop="zccssrqgj"
label="在产车实施日期"> label="在产车实施日期">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px"> <span>{{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format('YYYY-MM-DD') : '' }}</span>
{{
scope.row.attrInfoCaseMap.zccssrq ? $moment(scope.row.attrInfoCaseMap.zccssrq).format('YYYY-MM-DD') : '-'
}}
</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
prop="textStatus" prop="textStatus"
label="文本状态"> label="文本状态">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px"> <span style="margin-left: 10px">
{{ textStatusMap[scope.row.textStatus] }} {{ textStatusMap[scope.row.textStatus] }}
@@ -297,12 +423,12 @@
</el-table> </el-table>
</div> </div>
<pagination <pagination
:page="pageNo" :page="pageDo"
:pageSize="pageSizeNo" :pageSize="pageSizeDo"
:total="totalNo" :total="totalDo"
@pageChange="pageChangeNo" @pageChange="pageChangeDo"
@pageSizeChange="pageSizeChangeNo" @pageSizeChange="pageSizeChangeDo"
style="position: absolute;" style="position: absolute;"
/> />
</div> </div>
</div> </div>
@@ -340,17 +466,25 @@ export default {
standCommonlySearch: { standCommonlySearch: {
standSort: '', standSort: '',
standNumber: '', standNumber: '',
standType: '' standType: '',
page: 1,
Size: this.$store.getters.userInfo.configContent
}, },
//用来存放项目id //用来存放项目id
sarAccessListDatas: [],
proId: '', proId: '',
size: this.$store.getters.userInfo.configContent, size: this.$store.getters.userInfo.configContent,
pageSizeNo: this.$store.getters.userInfo.configContent, pageSizeNo: this.$store.getters.userInfo.configContent,
pageSize: this.$store.getters.userInfo.configContent, pageSize: this.$store.getters.userInfo.configContent,
pageNo: 1, pageNo: 1,
pageDo: 1,
pageSizeDo: this.$store.getters.userInfo.configContent,
standardData: [], //添加标准数据 standardData: [], //添加标准数据
detailedId: '', //清单id
totalNo: 0, totalNo: 0,
totalDo: 0,
standModel: false, // 选择标准抽屉状态 standModel: false, // 选择标准抽屉状态
detailedListModel: false, //调取清单的抽屉状态
selectList: [], //选择标准的选择框 selectList: [], //选择标准的选择框
selectList1: [], //选择标准的选择框 selectList1: [], //选择标准的选择框
dataList: [],//清单里的标准数据 dataList: [],//清单里的标准数据
@@ -361,6 +495,11 @@ export default {
Height: 0, Height: 0,
localProEO: {}, localProEO: {},
localProLib: {}, localProLib: {},
// 查询相关参数
sarSarAccessEOSearch: {
projectName: "",
detailedListName: "",
},
takeingFlag: false, takeingFlag: false,
exportModelFlag: false, exportModelFlag: false,
exportName: '', exportName: '',
@@ -373,18 +512,29 @@ export default {
} }
}, },
methods: { methods: {
// 搜索 //搜索清单
searchSarAccess(){
this.pageDo = 1
this.pageSizeDo = this.$store.getters.userInfo.configContent;
this.transfer()
},
// 搜索标准
search() { search() {
this.pageNo = 1 this.pageNo = 1
this.pageSizeNo = this.$store.getters.userInfo.configContent; this.pageSizeNo = this.$store.getters.userInfo.configContent;
this.addList() this.getStand()
},
clearSearchAccess(){
this.sarSarAccessEOSearch.projectName = ''
this.sarSarAccessEOSearch.detailedListName = ''
this.transfer()
}, },
clearSearch() { clearSearch() {
this.pageNo = 1 this.pageNo = 1
this.standCommonlySearch.standSort = '' this.standCommonlySearch.standSort = ''
this.standCommonlySearch.standNumber = '' this.standCommonlySearch.standNumber = ''
this.standCommonlySearch.standType = '' this.standCommonlySearch.standType = ''
this.addList() this.getStand()
}, },
pageChange(page) { pageChange(page) {
this.page = page; this.page = page;
@@ -396,36 +546,76 @@ export default {
}, },
pageChangeNo(page) { pageChangeNo(page) {
this.pageNo = page this.pageNo = page
this.addList() this.getStand()
},
pageChangeDo(page){
this.pageDo = page
this.transfer()
},
pageSizeChangeDo(pageSize){
this.pageDo = pageSize
this.transfer()
}, },
pageSizeChangeNo(pageSize) { pageSizeChangeNo(pageSize) {
this.pageSizeNo = this.$store.getters.userInfo.configContent; this.pageSizeNo = pageSize
this.addList() this.getStand()
}, },
//添加标准select的改变 //添加标准select的改变
selectThree(data) { selectThree(data) {
this.standList = data; this.standList = data;
}, },
//点击添加事件 // 表格选择框
addList() { selectOne(data) {
this.$http.get("sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage", { this.selectedList = [];
page: this.pageNo, for (let i = 0; i < data.length; i++) {
pageSize: this.pageSizeNo, this.selectedList.push(data[i].id);
standSort: this.standCommonlySearch.standSort, }
standNumber: this.standCommonlySearch.standNumber, },
standType: this.standCommonlySearch.standType // 点击 table查看按钮 事件
showTable(item) {
sessionStorage.setItem("accessRow", JSON.stringify(item));
this.$store.commit("setDetailMap", this.$route.path);
this.$router.push({
name: "AccessStandardDetails",
params: {
id: item.id
}
});
},
//点击获取项目清单
transfer(){
this.$http.get("sarLawsDetailedList/sar-laws-detailed-list/getAllStand", {
page: 1,
pageSize: this.pageSize,
...this.sarSarAccessEOSearch,
sortKey: 2
}, { }, {
_this: this, _this: this
}, res => { }, res => {
console.log('res') this.sarAccessListDatas = res.data.records;
console.log(res) this.sarSarAccessEOSearch.page = 1
this.standardData = res.data.list; this.totalNo = res.data.total
this.totalNo = res.data.count this.detailedListModel = true
}, e => { }, e => {
}); });
this.standModel = true;
}, },
//点击添加标准事件
// addList() {
// this.$http.get("sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage", {
// page: this.pageNo,
// pageSize: this.pageSizeNo,
// standSort: this.standCommonlySearch.standSort,
// standNumber: this.standCommonlySearch.standNumber,
// standType: this.standCommonlySearch.standType
// }, {
// _this: this,
// }, res => {
// this.standardData = res.data.list;
// this.totalNo = res.data.count
// }, e => {
// });
// this.standModel = true;
// },
// 点击批量删除事件 // 点击批量删除事件
deleteList() { deleteList() {
if (this.selectList.length < 1) { if (this.selectList.length < 1) {
@@ -488,6 +678,10 @@ export default {
}, e => { }, e => {
}) })
}, },
//调取清单取消事件
cancelDetailed(){
this.detailedListModel = false;
},
//添加标准取消事件 //添加标准取消事件
cancelStand() { cancelStand() {
this.standModel = false; this.standModel = false;
@@ -537,6 +731,23 @@ export default {
_this.standModel = false; _this.standModel = false;
} }
}, },
//获取标准
getStandrd(data){
this.detailedId = data.id
this.getStand();
},
getStand(data){
this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById", {
id:this.detailedId,
...this.standCommonlySearch,
}, {
_this: this
}, res => {
this.standardData = res.data.records
this.totalDo = res.data.total
this.standModel = true;
})
},
//选择清单确定事件 //选择清单确定事件
OkDrawer() { OkDrawer() {
if (this.selectList.length === 1) { if (this.selectList.length === 1) {
@@ -587,7 +798,6 @@ export default {
window.open(routeUrl.href, '_blank') window.open(routeUrl.href, '_blank')
}, },
back() { back() {
console.log(this.$route.query.tabName);
this.$router.push({ this.$router.push({
path: this.$store.state.detailMap, path: this.$store.state.detailMap,
query: { query: {
@@ -597,9 +807,7 @@ export default {
this.$store.commit('setDetailMap', '') this.$store.commit('setDetailMap', '')
}, },
showLocalProductData(item) { showLocalProductData(item) {
console.log(item)
this.localProEO = JSON.parse(JSON.stringify(item)) this.localProEO = JSON.parse(JSON.stringify(item))
console.log(this.localProEO)
this.proId = this.localProEO.id this.proId = this.localProEO.id
// 查询详情表格数据 // 查询详情表格数据
this.$http.get('sarStandProjectLibrary/queryStandInfo', { this.$http.get('sarStandProjectLibrary/queryStandInfo', {
@@ -609,7 +817,6 @@ export default {
loading: 'loading' loading: 'loading'
}, res => { }, res => {
this.dataList = res.data.records this.dataList = res.data.records
console.log(res)
this.total = res.data.total this.total = res.data.total
}, e => { }, e => {
}) })
@@ -645,7 +852,6 @@ export default {
} }
this.exportName = '' this.exportName = ''
this.exportModelFlag = true this.exportModelFlag = true
console.log(this.saveExportType);
}, },
//取消导出 //取消导出
cancal() { cancal() {
@@ -655,19 +861,16 @@ export default {
exportTestItem() { exportTestItem() {
if (this.saveExportType === 'apart') { if (this.saveExportType === 'apart') {
if (this.selectList != null && this.selectList != '') { if (this.selectList != null && this.selectList != '') {
console.log(this.selectList);
let ids = '\'' + this.selectList[0].standId + '\'' let ids = '\'' + this.selectList[0].standId + '\''
for (let i = 1; i < this.selectList.length; i++) { for (let i = 1; i < this.selectList.length; i++) {
ids += ',\'' + this.selectList[i].standId + '\'' ids += ',\'' + this.selectList[i].standId + '\''
} }
const exportURL = interfaceUrl + 'sarStandProjectLibrary/exportStandAttrInfoExcel?' + const exportURL = interfaceUrl + 'sarStandProjectLibrary/exportStandAttrInfoExcel?' +
'exportType' + this.saveExportType + '&ids=' + ids + '&exportName=' + this.exportName + '&id=' + this.localProEO.id 'exportType' + this.saveExportType + '&ids=' + ids + '&exportName=' + this.exportName + '&id=' + this.localProEO.id
console.log(exportURL, '_self')
window.open(exportURL, '_self') window.open(exportURL, '_self')
this.$message.success('导出信息成功') this.$message.success('导出信息成功')
} }
} else if (this.saveExportType === 'all') { } else if (this.saveExportType === 'all') {
console.log(this.selectList);
let ids = '' let ids = ''
if (this.dataList.length === 0) { if (this.dataList.length === 0) {
this.$message.error('暂无导出数据') this.$message.error('暂无导出数据')
@@ -680,7 +883,6 @@ export default {
} }
const exportURL = interfaceUrl + 'sarStandProjectLibrary/exportStandAttrInfoExcel?' + const exportURL = interfaceUrl + 'sarStandProjectLibrary/exportStandAttrInfoExcel?' +
'exportType' + this.saveExportType + '&ids=' + ids + '&exportName=' + this.exportName + '&id=' + this.localProEO.id 'exportType' + this.saveExportType + '&ids=' + ids + '&exportName=' + this.exportName + '&id=' + this.localProEO.id
console.log(exportURL, '_self')
window.open(exportURL, '_self') window.open(exportURL, '_self')
this.$message.success('导出信息成功') this.$message.success('导出信息成功')
} }
@@ -733,7 +935,6 @@ export default {
this.standSortOptions = res.data.STANDCLASSIFY // 标准类别 this.standSortOptions = res.data.STANDCLASSIFY // 标准类别
this.setMap(this.zrbmMap, res.data.ZRBMCLASS) this.setMap(this.zrbmMap, res.data.ZRBMCLASS)
this.setMap(this.textStatusMap, res.data.WBZTCLASS) this.setMap(this.textStatusMap, res.data.WBZTCLASS)
console.log(this.getLocalPro)
this.showLocalProductData(this.getLocalPro) this.showLocalProductData(this.getLocalPro)
}, e => { }, e => {
}) })