This commit is contained in:
宋伟佳
2021-08-17 18:20:55 +08:00
4 changed files with 137 additions and 38 deletions
@@ -108,7 +108,8 @@
label="标准号">
<template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{ scope.row.standNumber
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{
scope.row.standNumber
}}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSortShow }}
{{ scope.row.standNumber }}</a>
@@ -301,6 +302,8 @@
height="100%"
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@row-click="rowClick"
@select="select"
@selection-change="selectListChange"
ref="selection"
>
@@ -321,7 +324,8 @@
>
<template slot-scope="scope">
<a class="table-jump" @click.stop="showTable(scope.row)">{{
scope.row.detailedListName }}</a>
scope.row.detailedListName
}}</a>
</template>
</el-table-column>
<el-table-column
@@ -340,7 +344,8 @@
align="center">
<template slot-scope="scope">
<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>
</template>
</el-table-column>
@@ -368,6 +373,8 @@
height="100%"
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@row-click="rowClick"
@select="select"
@selection-change="selectListChange"
ref="selection"
>
@@ -388,7 +395,8 @@
>
<template slot-scope="scope">
<a class="table-jump" @click.stop="showTable(scope.row)">{{
scope.row.detailedListName }}</a>
scope.row.detailedListName
}}</a>
</template>
</el-table-column>
<el-table-column
@@ -407,7 +415,8 @@
align="center">
<template slot-scope="scope">
<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>
</template>
</el-table-column>
@@ -417,7 +426,8 @@
align="center">
<template slot-scope="scope">
<span
v-if="scope.row.applicationScope != null && scope.row.applicationScope !== ''">{{ scope.row.applicationScope
v-if="scope.row.applicationScope != null && scope.row.applicationScope !== ''">{{
scope.row.applicationScope
}}</span>
</template>
</el-table-column>
@@ -428,7 +438,8 @@
align="center">
<template slot-scope="scope">
<div>
{{ scope.row.updateTime ? $moment(scope.row.updateTime).format("YYYY-MM-D hh:mm:ss") : scope.row.updateTime
{{
scope.row.updateTime ? $moment(scope.row.updateTime).format("YYYY-MM-D hh:mm:ss") : scope.row.updateTime
}}
</div>
</template>
@@ -448,6 +459,8 @@
height="100%"
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@row-click="rowClick"
@select="select"
@selection-change="selectListChange"
ref="selection"
>
@@ -468,7 +481,8 @@
>
<template slot-scope="scope">
<a class="table-jump" @click.stop="showTable(scope.row)">{{
scope.row.detailedListName }}</a>
scope.row.detailedListName
}}</a>
</template>
</el-table-column>
<el-table-column
@@ -487,7 +501,8 @@
align="center">
<template slot-scope="scope">
<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>
</template>
</el-table-column>
@@ -497,7 +512,8 @@
align="center">
<template slot-scope="scope">
<span
v-if="scope.row.applicationScope != null && scope.row.applicationScope !== ''">{{ scope.row.applicationScope
v-if="scope.row.applicationScope != null && scope.row.applicationScope !== ''">{{
scope.row.applicationScope
}}</span>
</template>
</el-table-column>
@@ -508,7 +524,8 @@
align="center">
<template slot-scope="scope">
<div>
{{ scope.row.updateTime ? $moment(scope.row.updateTime).format("YYYY-MM-DD hh:mm:ss") : scope.row.updateTime
{{
scope.row.updateTime ? $moment(scope.row.updateTime).format("YYYY-MM-DD hh:mm:ss") : scope.row.updateTime
}}
</div>
</template>
@@ -616,7 +633,8 @@
scope.row.standNumber
}}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{
scope.row.standSortShow }}
scope.row.standSortShow
}}
{{ scope.row.standNumber }}</a>
</template>
</el-table-column>
@@ -728,7 +746,7 @@
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
import { saveTaskFirst, queryTaskFirst } from "api/process";
import {saveTaskFirst, queryTaskFirst} from "api/process";
import seeDatalis from "@/pages/localTool/standContrast/pages/seeDatalis";
export default {
@@ -778,21 +796,21 @@ export default {
},
formRules: {
listType: [
{ required: true, message: "请选择清单类型", trigger: "change" }
{required: true, message: "请选择清单类型", trigger: "change"}
],
listName: [
{ required: true, message: "请填写清单名称", trigger: "change" }
{required: true, message: "请填写清单名称", trigger: "change"}
]
},
roleFormRules: {
dockUserName: [
{ required: true, message: "请选择会签责任人", trigger: "change" }
{required: true, message: "请选择会签责任人", trigger: "change"}
],
ministerUserName: [
{ required: true, message: "请选择修订责任人", trigger: "change" }
{required: true, message: "请选择修订责任人", trigger: "change"}
],
directorUserName: [
{ required: true, message: "请选择审批责任人", trigger: "change" }
{required: true, message: "请选择审批责任人", trigger: "change"}
]
},
dataList: [],//清单里的标准数据
@@ -947,14 +965,14 @@ export default {
_this: this
}, res => {
this.sarAccessListDatas = res.data.records;
this.sarAccessListDatas.forEach(item =>{
this.sarAccessListDatas.forEach(item => {
// 适用车型转换
if (item.carType !== null) {
let k = (item.carType || "").split(',')
for (let i in this.energyKindOptions) {
for (let m = 0; m< k.length; m++) {
for (let m = 0; m < k.length; m++) {
if (this.energyKindOptions[i].value === k[m]) {
k[m] = this.energyKindOptions[i].label
k[m] = this.energyKindOptions[i].label
}
item.carType = k.join(',')
}
@@ -1097,7 +1115,7 @@ export default {
this.$refs["Form"].validate((valid) => {
if (valid) {
this.isSubmit = true
this.$http.get("lawss/activiti/startProcess", { type: "4" }, {
this.$http.get("lawss/activiti/startProcess", {type: "4"}, {
_this: this
}, res => {
if (res.ok) {
@@ -1129,8 +1147,8 @@ export default {
// 删除上传的文件
delFileInfo(file, fileList) {
this.fileInfoList.forEach((item, index) => {
if (item.name === file.name || item.id === file.id ) {
this.fileInfoList.splice(index,1)
if (item.name === file.name || item.id === file.id) {
this.fileInfoList.splice(index, 1)
}
})
},
@@ -1276,7 +1294,7 @@ export default {
this.listForm.listName = this.selectedList[0].detailedListName;
this.listForm.descriptionList = this.selectedList[0].remark;
// 将查询出的文件名字和id组合成数组
if(this.selectedList[0].fileName !== null) {
if (this.selectedList[0].fileName !== null) {
let textName = this.selectedList[0].fileName.split(',').map(item => {
return {
name: item
@@ -1290,7 +1308,7 @@ export default {
textName.forEach(item => {
this.$set(item, 'id', '')
})
for (let i = 0; i< textName.length; i++) {
for (let i = 0; i < textName.length; i++) {
textName[i].id = textId[i].id
}
this.fileInfoList = textName
@@ -1300,7 +1318,7 @@ export default {
this.ListModel = false;
this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById",
{ id: this.selectedList[0].id, page: this.page, Size: this.pageSize }, {
{id: this.selectedList[0].id, page: this.page, Size: this.pageSize}, {
_this: this
}, res => {
if (res.data === null) {
@@ -1308,10 +1326,10 @@ export default {
}
this.dataList = res.data.records;
this.dataList.forEach(item => {
if (item.xcxssrqgj === null){
if (item.xcxssrqgj === null) {
this.$set(item, "XCXSSRQ", '');
this.$set(item, "ZCCSSRQ", '');
}else{
} else {
this.$set(item, "XCXSSRQ", item.xcxssrqgj);
this.$set(item, "ZCCSSRQ", item.zccssrqgj);
}
@@ -1324,8 +1342,6 @@ export default {
this.listForm.inforlist = formId.join(",");
}, e => {
});
} else if (this.selectedList.length > 1) {
this.$message.warning("只能选择一条数据进行带入");
} else {
this.$message.warning("请选择一条数据进行带入");
}
@@ -1337,6 +1353,33 @@ export default {
this.selectedList.push(data[0]);
}
},
// 表格某一行的单击事件
rowClick(row, column) {
const selectData = this.selectList
this.$refs.selection.clearSelection()
if (selectData.length === 1) {
selectData.forEach(item => {
// 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
if (item === row) {
this.$refs.selection.toggleRowSelection(row, false);
}
// 不然就让当前的一行勾选
else {
this.$refs.selection.toggleRowSelection(row, true);
}
})
} else {
this.$refs.selection.toggleRowSelection(row, true);
}
},
select(selection, row) {
// 清除 所有勾选项
this.$refs.selection.clearSelection()
// 当表格数据都没有被勾选的时候 就返回
// 主要用于将当前勾选的表格状态清除
if (selection.length === 0) return
this.$refs.selection.toggleRowSelection(row, true)
},
//标准表格选择框改变
selectStandChange(data) {
this.selectList = [];
@@ -302,6 +302,8 @@
height="100%"
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@row-click="rowClick"
@select="select"
@selection-change="selectListChange"
ref="selection"
>
@@ -371,6 +373,8 @@
height="100%"
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@row-click="rowClick"
@select="select"
@selection-change="selectListChange"
ref="selection"
>
@@ -440,6 +444,8 @@
height="100%"
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@row-click="rowClick"
@select="select"
@selection-change="selectListChange"
ref="selection"
>
@@ -1301,8 +1307,6 @@ export default {
this.listForm.inforlist = formId.join(",");
}, e => {
});
} else if (this.selectedList.length > 1) {
this.$message.warning("只能选择一条数据进行带入");
} else {
this.$message.warning("请选择一条数据进行带入");
}
@@ -1321,10 +1325,38 @@ export default {
this.selectList.push(data[i].id);
}
},
select(selection, row) {
// 清除 所有勾选项
this.$refs.selection.clearSelection()
// 当表格数据都没有被勾选的时候 就返回
// 主要用于将当前勾选的表格状态清除
if(selection.length === 0) return
this.$refs.selection.toggleRowSelection(row, true)
},
//添加标准select的改变
selectThree(data) {
this.standList = data;
},
// 表格某一行的单击事件
rowClick(row, column) {
const selectData = this.selectList
this.$refs.selection.clearSelection()
if( selectData.length === 1 ) {
selectData.forEach(item => {
// 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
if (item === row) {
this.$refs.selection.toggleRowSelection(row, false);
}
// 不然就让当前的一行勾选
else {
this.$refs.selection.toggleRowSelection(row, true);
}
})
}
else {
this.$refs.selection.toggleRowSelection(row, true);
}
},
choiceZRR(type, title, id) {
this.nodeList = [];
this.nodeList.push(id);
@@ -672,19 +672,18 @@
<template v-if="index === 0" >
<el-form-item label="国家/地区" prop="" label-width="150px" class="add-form-item">
<el-select v-model="sarStandardsInfoEO.country" filterable clearable>
<el-select v-model="sarStandardsInfoEO.country" multiple filterable clearable>
<el-option
v-for="item in countryOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
>
{{ item.label }}
</el-option>
</el-select>
</el-form-item>
<el-form-item label="标准类别" prop="standSort" label-width="150px" class="add-form-item">
<el-select v-model="sarStandardsInfoEO.standSort" filterable>
<el-option
@@ -1675,6 +1674,7 @@ export default {
id: '',
standType: 'FOREIGN', // 标准分类
country: '',
countryArr:'',
standSort: '',
applyArctic: '',
standNumber: '',
@@ -2102,6 +2102,19 @@ export default {
props: {
},
watch: {
'sarStandardsInfoEO.country': {
handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') {
if (val instanceof Array) {
this.sarStandardsInfoEO.countryArr = val.join(",");
} else {
this.sarStandardsInfoEO.countryArr = val
}
} else if (val === '') {
this.sarStandardsInfoEO.countryArr = []
}
}
},
filterText(val) {
this.$refs.tree.filter(val);
}
@@ -2403,6 +2416,10 @@ export default {
},
// 编辑标准属性
selectStandardPro (item, state) {
// this.sarStandardsInfoEO.country=JSON.parse(item.country );
// console.log(this.sarStandardsInfoEO.country);
this.addOrUPdateFlag = 2
this.modalshowtitle = '编辑海外标准'
this.modalshowflag = true
@@ -2414,6 +2431,9 @@ export default {
console.log(formFieldList, 'AAAAAAAAAAAAAAAAAAAAA')
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
if(item.country !== undefined && item.country !== null){
this.sarStandardsInfoEO.country = item.country.split(",");
}
this.sarStandardsInfoEO.standSort = item.standSort
if (this.sarStandardsInfoEO.putTime != null && this.sarStandardsInfoEO.putTime !== '') {
this.sarStandardsInfoEO.putTime = this.sarStandardsInfoEO.putTime.replace(new RegExp(/-/gm), '/')
@@ -3088,6 +3108,7 @@ export default {
this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
if (flag) {
// 时间格式修改
this.sarStandardsInfoEO.country = this.sarStandardsInfoEO.countryArr;
let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
if (nowstandinfo.putTime != null && nowstandinfo.putTime !== '') {
nowstandinfo.putTime = this.$dateFormat(this.sarStandardsInfoEO.putTime, 'yyyy-MM-dd hh:mm:ss')
@@ -2530,6 +2530,9 @@
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
@import '~@/assets/styles/style';
/deep/ p{
display: inline;
}
/deep/.highlight-class {
color: red !important;
}