This commit is contained in:
宋伟佳
2021-11-29 15:03:43 +08:00
parent ccbe352cf0
commit f00ad24180
6 changed files with 160 additions and 237 deletions
@@ -63,7 +63,6 @@
</el-table-column>
<el-table-column
align="center"
width="200px"
label="标准号"
>
<template slot-scope="scope">
@@ -77,7 +76,6 @@
prop="standName"
align="center"
label="中文名称"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
@@ -87,12 +85,33 @@
prop="standEnName"
label="英文名称"
align="center"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standEnName }}</a>
</template>
</el-table-column>
<el-table-column
prop="standEnName"
label="分解单来源"
align="center"
>
<template slot-scope="scope">
<el-select
@change="fileTypeChange"
v-model="scope.row.fileType"
placeholder="请选择"
filterable
>
<el-option
v-for="item in decomposeOptions"
:value="item.attrField"
:key="item.id"
:label="item.attrName"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="ssrq"
width="190px"
@@ -129,32 +148,6 @@
width="180px"
>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppsbm"
width="180px"
align="center"
label="卡车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppscn"
width="180px"
align="center"
label="卡车vpps中文名称">
</el-table-column>
<el-table-column
prop="cycvppsbm"
width="180px"
align="center"
label="乘用车VPPS编码">
</el-table-column>
<el-table-column
prop="cycvppscn"
width="180px"
align="center"
label="乘用车vpps中文名称">
</el-table-column>
</el-table>
</div>
<div>
@@ -369,6 +362,8 @@ export default {
isSubmit: false,
saveLoading: false,
commentText: "",
fileType: '',
decomposeOptions: [], //分解单数据
//表单的数据
listForm: {
projectNumber: "", //项目编号
@@ -432,6 +427,22 @@ export default {
};
},
methods: {
fileTypeChange(type){
this.fileType = type
let ids = [];
let fileTypes = []
this.dataList.forEach(item => {
ids.push(item.standId);
fileTypes.push(item.fileType)
});
this.standId = ids.join(",");
this.fileType = fileTypes.join(",")
if(fileTypes.includes('')){
return
}else{
this.getClauseData()
}
},
// 表格勾选
handleSelectionChange(selection, val) {
if (selection.length > 1) {
@@ -527,14 +538,13 @@ export default {
ids.push(item.standId);
});
this.standId = ids.join(",");
this.getClauseData();
});
},
//查询标准下的条款
getClauseData() {
this.$http.get("SarStandItems/sar-stand-items/findAllItems", {
this.$http.get("SarStandItems/sar-stand-items/workflowFindItems", {
ids: this.standId,
type: "FBGBJBD"
type: this.fileType
},
{
_this: this
@@ -591,6 +601,15 @@ export default {
},
//流程提交事件
handleSubmit() {
let fileFlag
this.dataList.forEach(item => {
if(!item.fileType){
fileFlag = false
}
})
if(!fileFlag){
this.$message.warning('请选择分解单来源')
}
if (this.listForm.dataList.length < 1) {
this.$message.warning("请选择带标准的项目");
} else {
@@ -654,6 +673,22 @@ export default {
}
},
mounted() {
//查找分解单来源数据
this.$http.get('lawss/sarStandAttrDetails/getListData',{},{
_this: this
}, res => {
this.decomposeOptions.push(
{
attrField: 'BDR',
attrName: '不带入'
}
)
res.data.forEach(item => {
if(item.sarType === 'STAND' || item.sarType === 'INLAND_STAND' || item.sarType === 'FOREIGN_STAND'){
this.decomposeOptions.push(item)
}
})
})
this.getData();
this.getProjectData();
}
@@ -57,7 +57,6 @@
</el-table-column>
<el-table-column
align="center"
width="200px"
label="标准号"
>
<template slot-scope="scope">
@@ -69,7 +68,6 @@
prop="standName"
align="center"
label="中文名称"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
@@ -79,7 +77,6 @@
prop="standEnName"
label="英文名称"
align="center"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standEnName }}</a>
@@ -121,32 +118,6 @@
width="180px"
>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppsbm"
width="180px"
align="center"
label="卡车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppscn"
width="180px"
align="center"
label="卡车vpps中文名称">
</el-table-column>
<el-table-column
prop="cycvppsbm"
width="180px"
align="center"
label="乘用车VPPS编码">
</el-table-column>
<el-table-column
prop="cycvppscn"
width="180px"
align="center"
label="乘用车vpps中文名称">
</el-table-column>
</el-table>
</div>
<div>
@@ -73,7 +73,6 @@
</el-table-column>
<el-table-column
align="center"
width="200px"
label="标准号"
>
<template slot-scope="scope">
@@ -87,7 +86,6 @@
prop="standName"
align="center"
label="中文名称"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
@@ -97,12 +95,33 @@
prop="standEnName"
label="英文名称"
align="center"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standEnName }}</a>
</template>
</el-table-column>
<el-table-column
prop="standEnName"
label="分解单来源"
align="center"
>
<template slot-scope="scope">
<el-select
@change="fileTypeChange"
v-model="scope.row.fileType"
placeholder="请选择"
filterable
>
<el-option
v-for="item in decomposeOptions"
:value="item.attrField"
:key="item.id"
:label="item.attrName"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="ssrq"
width="190px"
@@ -139,32 +158,6 @@
width="180px"
>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppsbm"
width="180px"
align="center"
label="卡车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppscn"
width="180px"
align="center"
label="卡车vpps中文名称">
</el-table-column>
<el-table-column
prop="cycvppsbm"
width="180px"
align="center"
label="乘用车VPPS编码">
</el-table-column>
<el-table-column
prop="cycvppscn"
width="180px"
align="center"
label="乘用车vpps中文名称">
</el-table-column>
</el-table>
</div>
<div>
@@ -365,6 +358,7 @@ import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
import { saveTaskFirst } from "api/process";
import file from "@/pages/knowledgeGraph/components/file";
export default {
name: "xmpg2Step1",
@@ -378,6 +372,8 @@ export default {
active: "1", //当前选中的type
isSubmit: false,
saveLoading: false,
fileType: '',
decomposeOptions: [], //分解单来源数据
//表单的数据
listForm: {
projectNumber: "", //项目编号
@@ -447,6 +443,22 @@ export default {
};
},
methods: {
fileTypeChange(type){
this.fileType = type
let ids = [];
let fileTypes = []
this.dataList.forEach(item => {
ids.push(item.standId);
fileTypes.push(item.fileType)
});
this.standId = ids.join(",");
this.fileType = fileTypes.join(",")
if(fileTypes.includes('')){
return
}else{
this.getClauseData()
}
},
// 表格勾选
handleSelectionChange(selection, val) {
if (selection.length > 1) {
@@ -532,6 +544,9 @@ export default {
})
this.listForm.dataList = res.data.records;
this.dataList = res.data.records;
this.dataList.forEach(item => {
this.$set(item,'fileType', '')
})
this.listForm.dataList.forEach(item => {
// 责任部门转换
if (item.zrbm !== null || item.zrbm !== "") {
@@ -551,14 +566,13 @@ export default {
ids.push(item.standId);
});
this.standId = ids.join(",");
this.getClauseData();
});
},
//查询标准下的条款
getClauseData() {
this.$http.get("SarStandItems/sar-stand-items/findAllItems", {
this.$http.get("SarStandItems/sar-stand-items/workflowFindItems", {
ids: this.standId,
type: "FBGBJBD"
types: this.fileType
},
{
_this: this
@@ -604,6 +618,15 @@ export default {
},
//流程提交事件
handleSubmit() {
let fileFlag
this.dataList.forEach(item => {
if(!item.fileType){
fileFlag = false
}
})
if(!fileFlag){
this.$message.warning('请选择分解单来源')
}
if (this.listForm.dataList.length < 1) {
this.$message.warning("请选择带标准的项目");
} else {
@@ -687,6 +710,22 @@ export default {
this.zrbmOptions = res.data.ZRBMCLASS; // 责任部门
}, e => {
});
//查找分解单来源数据
this.$http.get('lawss/sarStandAttrDetails/getListData',{},{
_this: this
}, res => {
this.decomposeOptions.push(
{
attrField: 'BDR',
attrName: '不带入'
}
)
res.data.forEach(item => {
if(item.sarType === 'STAND' || item.sarType === 'INLAND_STAND' || item.sarType === 'FOREIGN_STAND'){
this.decomposeOptions.push(item)
}
})
})
}
};
</script>
@@ -57,7 +57,6 @@
</el-table-column>
<el-table-column
align="center"
width="200px"
label="标准号"
>
<template slot-scope="scope">
@@ -69,7 +68,6 @@
prop="standName"
align="center"
label="中文名称"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
@@ -79,7 +77,6 @@
prop="standEnName"
label="英文名称"
align="center"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standEnName }}</a>
@@ -121,32 +118,6 @@
width="180px"
>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppsbm"
width="180px"
align="center"
label="卡车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppscn"
width="180px"
align="center"
label="卡车vpps中文名称">
</el-table-column>
<el-table-column
prop="cycvppsbm"
width="180px"
align="center"
label="乘用车VPPS编码">
</el-table-column>
<el-table-column
prop="cycvppscn"
width="180px"
align="center"
label="乘用车vpps中文名称">
</el-table-column>
</el-table>
</div>
<div>