feat: 标准库 编辑对应属性字段 体系树结构 流程

This commit is contained in:
super_liu
2021-07-11 15:47:50 +08:00
parent 2ae9d80a16
commit 1ab0345cce
8 changed files with 601 additions and 145 deletions
+8
View File
@@ -22,6 +22,7 @@
<el-tree class="common-tree" :style="style" ref="tree" :data="data" :props="defaultProps"
:show-checkbox="multiple"
:node-key="nodeKey"
:disabled="disabled"
:check-strictly="checkStrictly"
default-expand-all
:expand-on-click-node="false"
@@ -77,6 +78,12 @@
return false;
}
},
disabled: {
type: Boolean,
default () {
return false;
}
},
// 默认选中的节点key数组
checkedKeys: {
type: Array,
@@ -110,6 +117,7 @@
};
},
mounted () {
debugger
if (this.checkedKeys.length > 0) {
if (this.multiple) {
this.defaultCheckedKeys = this.checkedKeys;
@@ -114,15 +114,10 @@
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.standInData === '0'" label="标准体系" prop="standSystem" class="add-form-item form-item-disabled">
<el-select v-model="form.standSystem" placeholder="请选择标准体系">
<el-option
v-for="item in standSystemOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
<tree-select
:data="standSystemOptions"
:defaultProps="defaultProps" :checkedKeys="defaultCheckedKeys"
:nodeKey="nodeKey" @popoverHide="popoverHide"></tree-select>
</el-form-item>
<el-form-item v-if="form.standInData === '1'" label="标签" prop="gxhbq" class="add-form-item form-item-disabled">
<el-input
@@ -630,6 +625,8 @@
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import {saveTaskFirst} from "api/process";
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
export default {
name: "bzrkStep1",
data () {
@@ -640,6 +637,12 @@
active: '1', // 默认显示
isSubmit: false,
saveLoading: false,
defaultProps: {
children: 'children',
label: 'menuName'
},
nodeKey: 'id',
defaultCheckedKeys: [],
form: {
// 基础信息
textStatus: '', // 文本状态
@@ -654,6 +657,7 @@
issueTime: '', // 发布时间
isRelateAccess: '', // 是否纳入认证清单
standSystem: '',// 标准体系
standSystemName: '',// 标准体系名称
gxhbq: '', // 标签
// 实施日期
ssrq: '', // 实施日期(标准文本)
@@ -724,9 +728,17 @@
components: {
ProcessHeader,
ProcessFooter,
ProcessTitle
ProcessTitle,
TreeSelect
},
methods: {
popoverHide (checkedIds, checkedData) {
console.log(checkedIds);
console.log(checkedData);
this.form.standSystem = checkedData.id
this.form.standSystemName = checkedData.menuName
console.log(this.sarStandardsInfoEO.standSystem);
},
closeDrawer() {
this.ListModel = false
},
@@ -771,7 +783,7 @@
},
handleSubmit() {
var json = this.form
json.zrUserId = this.$store.getters.userInfo.userId+',5UM3769REUPLPRTRJ54R'
json.zrUserId = this.$store.getters.userInfo.userId
json.jlUserId = this.$store.getters.userInfo.userId
json.commentText = this.commentText
json.applyUpdUserId = this.$store.getters.userInfo.userId
@@ -120,18 +120,14 @@
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.standInData === '0'" label="标准体系" prop="standSystem" class="add-form-item form-item-disabled">
<el-select v-model="form.standSystem" placeholder="请选择标准体系" disabled>
<el-option
v-for="item in standSystemOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
<el-input
disabled
v-model="form.standSystemName"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="form.standInData === '1'" label="标签" prop="gxhbq" class="add-form-item form-item-disabled">
<el-input
<el-input
disabled
v-model="form.gxhbq"
placeholder="请输入标签"
@@ -676,6 +672,8 @@
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import {inboundLiaisonDetail,processCreateStand} from 'api/process'
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
export default {
name: "bzrkStep2",
data () {
@@ -693,6 +691,12 @@
active: '1', // 默认显示
isSubmit: false,
saveLoading: false,
defaultProps: {
children: 'children',
label: 'menuName'
},
nodeKey: 'id',
defaultCheckedKeys: [],
form: {
// 基础信息
textStatus: '', // 文本状态
@@ -707,6 +711,7 @@
issueTime: '', // 发布时间
isRelateAccess: '', // 是否纳入认证清单
standSystem: '',// 标准体系
standSystemName: '',// 标准体系
gxhbq: '', // 标签
// 实施日期
ssrq: '', // 实施日期(标准文本)
@@ -785,7 +790,8 @@
components: {
ProcessHeader,
ProcessFooter,
ProcessTitle
ProcessTitle,
TreeSelect
},
computed: {
listNoDataText () {
@@ -793,6 +799,12 @@
},
},
methods: {
popoverHide (checkedIds, checkedData) {
console.log(checkedIds);
console.log(checkedData);
this.form.standSystem = checkedData.id
console.log(this.sarStandardsInfoEO.standSystem);
},
processTable () {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum,
@@ -825,6 +837,7 @@
getFormFieldList (item) {
this.$nextTick(() => {
this.form = JSON.parse(JSON.stringify(item))
this.defaultCheckedKeys = [this.form.standSystem];
this.form.standType = this.form.standInData === '0' ? 'INLAND' : 'FOREIGN'
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
@@ -119,15 +119,11 @@
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.standInData === '0'" label="标准体系" prop="standSystem" class="add-form-item form-item-disabled">
<el-select v-model="form.standSystem" placeholder="请选择标准体系" disabled>
<el-option
v-for="item in standSystemOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
<el-input
disabled
v-model="form.standSystemName"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="form.standInData === '1'" label="标签" prop="gxhbq" class="add-form-item form-item-disabled">
<el-input
@@ -669,6 +665,8 @@ import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import {inboundLiaisonDetail,processCreateStand} from 'api/process'
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
export default {
name: "bzrkStep3",
data () {
@@ -686,6 +684,12 @@ export default {
active: '1', // 默认显示
isSubmit: false,
saveLoading: false,
defaultProps: {
children: 'children',
label: 'menuName'
},
nodeKey: 'id',
defaultCheckedKeys: [],
form: {
// 基础信息
textStatus: '', // 文本状态
@@ -778,7 +782,8 @@ export default {
components: {
ProcessHeader,
ProcessFooter,
ProcessTitle
ProcessTitle,
TreeSelect
},
computed: {
listNoDataText () {
@@ -786,6 +791,9 @@ export default {
},
},
methods: {
popoverHide (checkedIds, checkedData) {
this.form.standSystem = checkedData.id
},
processTable () {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum,
@@ -818,10 +826,12 @@ export default {
getFormFieldList (item) {
this.$nextTick(() => {
this.form = JSON.parse(JSON.stringify(item))
this.defaultCheckedKeys = [this.form.standSystem];
this.form.standType = this.form.standInData === '0' ? 'INLAND' : 'FOREIGN'
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = item.id
this.$forceUpdate()
})
},
closeDrawer() {
@@ -886,7 +896,6 @@ export default {
},
mounted () {
this.processTable()
this.getData()
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
@@ -894,6 +903,7 @@ export default {
this.standNatureOptions = res.data.SARPROPERTY // 标准性质
this.standStateOptions = res.data.WBZTCLASS // 文本状态
this.standSystemOptions = res.data.BZTXCLASS // 标准体系
console.log(this.standSystemOptions)
this.applyArcticOptions = res.data.ENERGYTYPES // 适用车型
this.categoryOptions = res.data.NYLXCLASS // 能源类型
this.applyAuthOptions = res.data.SYRZCLASS // 适用认证
@@ -902,8 +912,10 @@ export default {
this.zrbmOptions = res.data.ZRBMCLASS // 责任部门
this.zrgcsOptions = res.data.ZRGCSCLASS // 责任工程师
this.txlbOptions = res.data.TXLBCLASS // 体系类别
this.getData()
})
}
this.$forceUpdate()
},
}
</script>
@@ -114,15 +114,10 @@
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.standInData === '0'" label="标准体系" prop="standSystem" class="add-form-item form-item-disabled">
<el-select v-model="form.standSystem" placeholder="请选择标准体系">
<el-option
v-for="item in standSystemOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
<tree-select v-if="treeStatus"
:data="standSystemOptions"
:defaultProps="defaultProps" :checkedKeys="defaultCheckedKeys"
:nodeKey="nodeKey" @popoverHide="popoverHide"></tree-select>
</el-form-item>
<el-form-item v-if="form.standInData === '1'" label="标签" prop="gxhbq" class="add-form-item form-item-disabled">
<el-input
@@ -646,6 +641,8 @@ import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import {inboundLiaisonDetail,processCreateStand} from 'api/process'
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
export default {
name: "bzrkStep4",
data () {
@@ -663,6 +660,13 @@ export default {
active: '1', // 默认显示
isSubmit: false,
saveLoading: false,
defaultProps: {
children: 'children',
label: 'menuName'
},
nodeKey: 'id',
defaultCheckedKeys: [],
treeStatus:false,
form: {
// 基础信息
textStatus: '', // 文本状态
@@ -677,6 +681,7 @@ export default {
issueTime: '', // 发布时间
isRelateAccess: '', // 是否纳入认证清单
standSystem: '',// 标准体系
standSystemName: '',// 标准体系
gxhbq: '', // 标签
// 实施日期
ssrq: '', // 实施日期(标准文本)
@@ -755,7 +760,8 @@ export default {
components: {
ProcessHeader,
ProcessFooter,
ProcessTitle
ProcessTitle,
TreeSelect
},
computed: {
listNoDataText () {
@@ -763,6 +769,12 @@ export default {
},
},
methods: {
popoverHide (checkedIds, checkedData) {
console.log(checkedIds);
console.log(checkedData);
this.form.standSystem = checkedData.id
this.form.standSystemName = checkedData.menuName
},
processTable () {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum,
@@ -795,10 +807,12 @@ export default {
getFormFieldList (item) {
this.$nextTick(() => {
this.form = JSON.parse(JSON.stringify(item))
this.defaultCheckedKeys = [this.form.standSystem];
this.form.standType = this.form.standInData === '0' ? 'INLAND' : 'FOREIGN'
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = item.id
this.$forceUpdate()
})
},
closeDrawer() {
@@ -861,6 +875,9 @@ export default {
})
},
},
created(){
this.getData()
},
mounted () {
this.processTable()
this.getData()
@@ -879,7 +896,15 @@ export default {
this.zrbmOptions = res.data.ZRBMCLASS // 责任部门
this.zrgcsOptions = res.data.ZRGCSCLASS // 责任工程师
this.txlbOptions = res.data.TXLBCLASS // 体系类别
this.treeStatus = true
})
},
watch:{
form(val){
if(this.form){
}
}
}
}
</script>
@@ -119,15 +119,10 @@
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.standInData === '0'" label="标准体系" prop="standSystem" class="add-form-item form-item-disabled">
<el-select v-model="form.standSystem" placeholder="请选择标准体系" disabled>
<el-option
v-for="item in standSystemOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
<tree-select
:data="standSystemOptions"
:defaultProps="defaultProps" :checkedKeys="defaultCheckedKeys"
:nodeKey="nodeKey" @popoverHide="popoverHide"></tree-select>
</el-form-item>
<el-form-item v-if="form.standInData === '1'" label="标签" prop="gxhbq" class="add-form-item form-item-disabled">
<el-input
@@ -669,6 +664,8 @@
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import {inboundLiaisonDetail,processCreateStand} from 'api/process'
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
export default {
name: "bzrkStep5",
data () {
@@ -686,6 +683,12 @@
active: '1', // 默认显示
isSubmit: false,
saveLoading: false,
defaultProps: {
children: 'children',
label: 'menuName'
},
nodeKey: 'id',
defaultCheckedKeys: [],
form: {
// 基础信息
textStatus: '', // 文本状态
@@ -778,7 +781,8 @@
components: {
ProcessHeader,
ProcessFooter,
ProcessTitle
ProcessTitle,
TreeSelect
},
computed: {
listNoDataText () {
@@ -786,6 +790,12 @@
},
},
methods: {
popoverHide (checkedIds, checkedData) {
console.log(checkedIds);
console.log(checkedData);
this.form.standSystem = checkedData.id
console.log(this.sarStandardsInfoEO.standSystem);
},
processTable () {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum,
@@ -818,6 +828,7 @@
getFormFieldList (item) {
this.$nextTick(() => {
this.form = JSON.parse(JSON.stringify(item))
this.defaultCheckedKeys = [this.form.standSystem];
this.form.standType = this.form.standInData === '0' ? 'INLAND' : 'FOREIGN'
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
@@ -1132,7 +1132,7 @@ export default {
},
productModelAdd: {
id : "",
sorDivide : null,
sorDivide : "INLAND_STAND",
menuName : "",
parentId : null,
parentIds : null,
@@ -1654,8 +1654,7 @@ export default {
},
methods: {
popoverHide (checkedIds, checkedData) {
console.log(checkedIds);
console.log(checkedData);
console.log(checkedData)
this.sarStandardsInfoEO.standSystem = checkedData.id
console.log(this.sarStandardsInfoEO.standSystem);
},
@@ -1894,6 +1893,7 @@ export default {
const [displayLocation] = values
const formFieldList = this.formFieldList
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
console.log(this.sarStandardsInfoEO)
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
this.sarStandardsInfoEO.standSort = item.standSort
if (this.sarStandardsInfoEO.putTime != null && this.sarStandardsInfoEO.putTime !== '') {
@@ -13,6 +13,32 @@
@node-click="treeClick"
default-expand-all
:expand-on-click-node="false">
<span class="custom-tree-node" slot-scope="{ node, data }" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
<span> {{ node.label}} </span>
<span>
<el-button
type="text"
size="mini"
v-show="data.show"
@click="() => append(data)">
新增
</el-button>
<el-button
type="text"
size="mini"
v-show="data.show"
@click="() => update(data)">
编辑
</el-button>
<el-button
type="text"
size="mini"
v-show="data.showDel"
@click="() => remove(node, data)">
删除
</el-button>
</span>
</span>
</el-tree>
</div>
<div class="tree-collapse" @click="treeCollapse" :class="{ 'tree-close': sideClose }">
@@ -88,23 +114,23 @@
size="mini"
@click="exportStandard()"
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
v-btn-permission="'J2X4KHNN4N'"><i class="iconfont">&#xe6e9;</i>导出</el-button>
><i class="iconfont">&#xe6e9;</i>导出</el-button>
<el-button class="common-button-default delete-button"
:loading="delLoading"
size="mini"
@click="deleteStand(2)"
v-btn-permission="'YZ2A6NPGFP'"><i class="iconfont">&#xe61b;</i>批量删除</el-button>
><i class="iconfont">&#xe61b;</i>批量删除</el-button>
<el-button class="common-button-default"
size="mini"
@click="deleteStandFromKind(2)"
v-btn-permission="'XSS8C793DQ'"><i class="iconfont">&#xe611;</i>移除标准</el-button>
><i class="iconfont">&#xe611;</i>移除标准</el-button>
<el-button class="common-button-default"
size="mini" :loading="searching"
@click="uploadImportModal(1)"
v-btn-permission="'4mFaJU3fTS'"><i class="iconfont">&#xe825;</i>模板下载</el-button>
><i class="iconfont">&#xe825;</i>模板下载</el-button>
<el-button class="common-button-default"
size="mini" @click="configurationStandard"
v-btn-permission="'98RZSZMZVQ'"><i class="iconfont">&#xe669;</i>配置标准</el-button>
><i class="iconfont">&#xe669;</i>配置标准</el-button>
</div>
<div class="content">
<div class="table-wrap">
@@ -200,7 +226,7 @@
>
取消收藏
</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'PVSCKGE7XU'">编辑</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '编辑']" >编辑</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '分享']" v-btn-permission="'LTS4PZ2AR7'">分享</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="'YZ2A6NPGFP'">删除</el-dropdown-item>
</el-dropdown-menu>
@@ -303,86 +329,132 @@
:rules="sarStandardsInfoRules"
class="label-input-form"
>
<el-form-item
prop="isRelateAccess"
label-width="150px"
class="add-form-item"
title="A类必填项多,仅A类可纳入法规清单。"
>
<template slot="label">重要度<i class="el-icon-warning-outline"></i></template>
<el-select v-model="sarStandardsInfoEO.isRelateAccess" @change="isRegulationsChange">
<el-option value="1" label="A" key="1"></el-option>
<el-option value="0" label="B" key="0"></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
v-for="item in standSortOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="标准编号" prop="standNumber" label-width="150px" class="add-form-item">
<el-input v-model="sarStandardsInfoEO.standNumber"
placeholder="请输入标准编号"
clearable></el-input>
</el-form-item>
<el-form-item label="标准年份/系列" prop="standYear" label-width="150px" class="add-form-item">
<el-input v-model="sarStandardsInfoEO.standYear"
placeholder="请输入标准年份/系列"
clearable></el-input>
</el-form-item>
<el-form-item label="中文名称" prop="standName" label-width="150px" class="add-form-item">
<el-input v-model="sarStandardsInfoEO.standName"
placeholder="请输入标准名称"
clearable></el-input>
</el-form-item>
<el-form-item label="英文名称" prop="standEnName" label-width="150px" class="add-form-item">
<el-input v-model="sarStandardsInfoEO.standEnName"
placeholder="请输入标准英文名称"
clearable></el-input>
</el-form-item>
<el-form-item title="“计划修订”、“修订中”均为现行有效版本;“已修订”标准的有效性根据实际实施情况判定。"
prop="standState" label-width="150px" class="add-form-item">
<template slot="label">标准状态<i class="el-icon-warning-outline"></i></template>
<el-select v-model="sarStandardsInfoEO.standState"
placeholder="请选择标准状态"
clearable>
<el-option
v-for="opt in standStateOptions"
:disabled="opt.value !== 'ZTXXYX' && opt.value !== standState && modalshowtitle !== '编辑海外标准'"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value" :label="opt.label"
>
{{ opt.label }}
</el-option>
</el-select>
</el-form-item>
<custom-date-pick-with-text2
:config="{
attrName: '发布日期',
attrField: 'issueTime'
}"
v-model="sarStandardsInfoEO.issueTime"
:disabled="formdisableflag"
></custom-date-pick-with-text2>
<el-form-item label="文本说明" prop="synopsis" label-width="150px" class="add-form-item">
<el-input
type="text"
v-model="sarStandardsInfoEO.synopsis"
placeholder="请输入"
clearable
></el-input>
</el-form-item>
<!-- <el-form-item-->
<!-- prop="isRelateAccess"-->
<!-- label-width="150px"-->
<!-- class="add-form-item"-->
<!-- title="A类必填项多,仅A类可纳入法规清单。"-->
<!-- >-->
<!-- <template slot="label">重要度<i class="el-icon-warning-outline"></i></template>-->
<!-- <el-select v-model="sarStandardsInfoEO.isRelateAccess" @change="isRegulationsChange">-->
<!-- <el-option value="1" label="A" key="1"></el-option>-->
<!-- <el-option value="0" label="B" key="0"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="适用区域" prop="country" label-width="150px" class="add-form-item form-item-disabled">-->
<!-- <el-select v-model="sarStandardsInfoEO.country" disabled >-->
<!-- <el-option v-for="opt in countryOptions" :value="opt.value === undefined ? '' :opt.value" :key="opt.value" :label="opt.label">{{ opt.label }}</el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="文本说明" prop="synopsis" label-width="150px" class="add-form-item">-->
<!-- <el-input-->
<!-- type="text"-->
<!-- v-model="sarStandardsInfoEO.synopsis"-->
<!-- placeholder="请输入"-->
<!-- clearable-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- 动态数据-->
<template v-for="(displayLocation, index) in dynamicFormField">
<el-col :span="24" :key="index">
<div class="divider-line">{{ displayLocation.label }}</div>
</el-col>
<template v-if="index === 0" >
<el-form-item label="标准类别" prop="standSort" label-width="150px" class="add-form-item">
<el-select v-model="sarStandardsInfoEO.standSort" filterable>
<el-option
v-for="item in standSortOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="标准编号" prop="standNumber" label-width="150px" class="add-form-item">
<el-input v-model="sarStandardsInfoEO.standNumber"
placeholder="请输入标准编号"
clearable></el-input>
</el-form-item>
<el-form-item label="标准年份" prop="standYear" label-width="150px" class="add-form-item">
<el-input v-model="sarStandardsInfoEO.standYear"
placeholder="请输入标准年份"
clearable></el-input>
</el-form-item>
<el-form-item label="标准中文名称" prop="standName" label-width="150px" class="add-form-item">
<el-input v-model="sarStandardsInfoEO.standName"
placeholder="请输入中文名称"
clearable></el-input>
</el-form-item>
<el-form-item label="标准英文名称" prop="standEnName" label-width="150px" class="add-form-item">
<el-input v-model="sarStandardsInfoEO.standEnName"
placeholder="请输入标准英文名称"
clearable></el-input>
</el-form-item>
<el-form-item prop="standNature" label-width="150px" class="add-form-item">
<template slot="label">标准性质</template>
<el-select v-model="sarStandardsInfoEO.standNature"
placeholder="请选择标准性质"
clearable>
<el-option
v-for="item in standNatureOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
>
{{ item.label }}
</el-option>
</el-select>
</el-form-item>
<el-form-item title="“计划修订”、“修订中”均为现行有效版本;“已修订”标准的有效性根据实际实施情况判定。"
prop="standState" label-width="150px" class="add-form-item">
<template slot="label">文本状态<i class="el-icon-warning-outline"></i></template>
<el-select v-model="sarStandardsInfoEO.textStatus"
placeholder="请选择文本状态"
clearable>
<el-option
v-for="opt in standStateOptions"
:disabled="opt.value !== 'ZTXXYX' && opt.value !== standState && modalshowtitle !== '编辑国内标准'"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value" :label="opt.label"
>
{{ opt.label }}
</el-option>
</el-select>
</el-form-item>
<custom-date-pick-with-text2
:config="{
attrName: '发布日期',
attrField: 'issueTime'
}"
v-model="sarStandardsInfoEO.issueTime"
:disabled="formdisableflag"
></custom-date-pick-with-text2>
<!--</el-form-item>-->
<el-form-item
prop="isRelateAccess"
label-width="150px"
class="add-form-item"
>
<template slot="label">是否纳入认证清单</template>
<el-select v-model="sarStandardsInfoEO.isRelateAccess" @change="isRegulationsChange">
<el-option value="1" label="是" key="1"></el-option>
<el-option value="2" label="否" key="2"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item-->
<!-- prop="standSystem"-->
<!-- label-width="150px"-->
<!-- class="add-form-item"-->
<!-- >-->
<!-- <template slot="label">标准体系</template>-->
<!-- <tree-select-->
<!-- :data="standSystemOptions"-->
<!-- :defaultProps="defaultProps" :checkedKeys="defaultCheckedKeys"-->
<!-- :nodeKey="nodeKey" @popoverHide="popoverHide"></tree-select>-->
<!-- </el-form-item>-->
</template>
<template v-for="field in displayLocation.child">
<template v-if="field.attrField === 'EOPSSRQ'">
<custom-eop-date-pick
@@ -855,6 +927,64 @@
<el-button size="mini" class="common-button-default" icon="el-icon-close" @click="treeCancel">取消</el-button>
</div>
</el-drawer>
<!-- 新建抽屉 -->
<el-drawer
:wrapperClosable="false"
:title="productTitle"
:visible.sync="productModal"
size="800px"
:before-close="closeDrawer"
label-width="130px"
>
<div class="demo-drawer-content">
<el-form :model="productModelAdd"
ref="productModelAdd"
:rules="productRules"
class="label-input-form"
label-width="130px">
<el-row>
<el-col>
<el-form-item label="菜单名称" prop="menuName" class="add-form-item">
<el-input v-model.trim="productModelAdd.menuName" placeholder="请输入菜单名称" clearable></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="排序号" prop="displaySeq" class="add-form-item">
<el-input v-model.number="productModelAdd.displaySeq"
number
placeholder="请输入排序号"
:maxlength="4"
clearable></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item v-if="modalType === 2" label="上级菜单" prop="parentIdsName" class="add-form-item">
<el-input v-model="productModelAdd.parentIdsName" disabled
clearable></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="描述" prop="remarks" class="add-form-item">
<el-input v-model.trim="productModelAdd.remarks"
placeholder="请输入描述"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button
class="common-button-primary"
icon="el-icon-check"
type="primary"
@click="saveProduct('productModelAdd')">提交</el-button>
<el-button
class="common-button-default"
icon="el-icon-close"
@click="closeModal">取消</el-button>
</div>
</el-drawer>
<!-- 导入失败 -->
<el-dialog :visible.sync="importFailed" :close-on-click-modal="false" width="400px">
<p slot="title" style="color:#f60">
@@ -901,6 +1031,7 @@ import CustomSVPPS from '@/components/CustomFormComponents/SVPPS'
import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
import CustomDatePickWithText2 from '@/components/CustomFormComponents/DatePickerWithText2'
import { interfaceUrl } from "@/sysConfig";
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
export default {
name: 'foreignStandardsAndRegulations',
@@ -920,7 +1051,8 @@ export default {
CustomDatePickWithText,
CustomSVPPS,
CustomRoleTree,
CustomDatePickWithText2
CustomDatePickWithText2,
TreeSelect
},
data () {
return {
@@ -929,6 +1061,15 @@ export default {
label: 'menuName',
children: 'children'
},
defaultProps: {
children: 'children',
label: 'menuName'
},
nodeKey: 'id',
defaultCheckedKeys: [],
productModal: false, // 模态框是否打开
modalType: '',
productTitle: '', // 模态框标题
menuTreeLoading: true,
orderBy:'',
nowOrder:'',
@@ -1004,6 +1145,11 @@ export default {
countryOptions: [],
regionOptions: [], // 区域
standSortOptions: [], // 标准类别下拉框
standSystemOptions: [], // 标准体系下拉框
sycpxOptions: [], // 适用产品线下拉框
zrbmOptions: [], // 责任部门下拉框
zrgcsOptions: [], // 责任工程师下拉框
txlbOptions: [], // 体系类别下拉框
standSortConfigOptions: [], // 标准类别下拉框
applyArcticOptions: [], // 适用车型下拉框
standStateOptions: [], // 标准状态下拉框
@@ -1229,6 +1375,52 @@ export default {
menuModalTitle: '',
menuModalFlag: false,
deleteMenuModal: false,
// 规范
productRules: {
menuName: [
{required: true, message: '一级菜单不能为空', trigger: 'blur'},
{type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'}
],
displaySeq: [
{type: 'number', required: true, message: '排序号不能为空且为正整数', trigger: 'blur'},
{type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'}
],
remarks: [
{type: 'string', max: 500, message: '最多输入500位', trigger: 'blur'}
],
dicTypeName: [
{required: true, message: '选项不能为空', trigger: 'blur'},
{type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'}
],
showIndex: [
{type: 'number', required: true, message: '排序号不能为空且为正整数', trigger: 'blur'},
{type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'}
],
describes: [
{type: 'string', max: 500, message: '最多输入500位', trigger: 'blur'}
]
},
productModelAdd: {
id : "",
sorDivide : "FOREIGN_STAND",
menuName : "",
parentId : null,
parentIds : null,
parentIdsName : "",
displaySeq : "",
validFlag : "",
creationTime : "",
modifyTime : "",
remarks : "",
children : [],
// 模态框信息
dicTypeName: '',
showIndex: '',
// 描述
describes: '',
// 唯一辨识
dicId: ""
},
sarMenu: {
id: '',
parentId: '',
@@ -1454,6 +1646,77 @@ export default {
watch: {
},
methods: {
popoverHide (checkedIds, checkedData) {
console.log(checkedIds);
console.log(checkedData);
this.sarStandardsInfoEO.standSystem = checkedData.id
console.log(this.sarStandardsInfoEO.standSystem);
},
closeModal () {
this.productModal = false
this.closeDrawer()
},
// 提交新增/修改
saveProduct (name) {
this.$refs[name].validate((valid) => {
if (valid) {
if (this.modalType === 1) {
this.$http.postData('sarResource/ts-resource/add', this.productModelAdd, {
_this: this
}, res => {
if (res.ok) {
this.selectMenu()
this.productModal = false
this.productModelAdd = {
// 模态框信息
dicTypeName: '',
showIndex: '',
// 描述
describes: '',
// 唯一辨识
dicId: this.$route.params.id
}
} else {
this.productModal = true
}
}, e => {})
} else if (this.modalType === 2) {
this.$http.putData('sarResource/ts-resource', this.productModelAdd, {
_this: this
}, res => {
this.selectMenu()
this.productModal = false
this.productModelAdd = {
// 模态框信息
dicTypeName: '',
showIndex: '',
// 描述
describes: '',
// 唯一辨识
dicId: this.$route.params.id
}
}, e => {
})
}
} else {
}
})
},
closeDrawer () {
this.$nextTick(() => {
this.$refs['productModelAdd'].resetFields()
this.productModelAdd = {
// 模态框信息
dicTypeName: '',
showIndex: '',
// 描述
describes: '',
// 唯一辨识
dicId: this.$route.params.id
}
})
this.productModal = false
},
// 树点击
isTreeOk (checkedList) {
this.shareStandardSelect = []
@@ -1596,6 +1859,7 @@ export default {
const [displayLocation] = values
const formFieldList = this.formFieldList
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
this.defaultCheckedKeys = [this.sarStandardsInfoEO.standSystem];
this.sarStandardsInfoEO.standSort = item.standSort
if (this.sarStandardsInfoEO.putTime != null && this.sarStandardsInfoEO.putTime !== '') {
this.sarStandardsInfoEO.putTime = this.sarStandardsInfoEO.putTime.replace(new RegExp(/-/gm), '/')
@@ -1639,6 +1903,112 @@ export default {
})
})
},
// 查询二级菜单
selectChildMenu (row) {
this.$http.get('sarResource/ts-resource/getMenuById', {
menuId: row.id
}, {}, res => {
if (res.ok) {
if(this.modalType === 1){
let idsName = ""
if(row.parentIds !== null){
if(row.parentIds.indexOf(res.data.id) != -1){
this.productModelAdd.parentIds = row.parentIds
}else {
this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id
idsName = row.parentIdsName + ',' + res.data.menuName
}
}else {
this.productModelAdd.parentIds = res.data.id
idsName = res.data.menuName;
}
this.productModelAdd.parentId = res.data.id
this.productModelAdd.parentIdsName = idsName
this.$forceUpdate()
}else {
this.productModelAdd = res.data
}
}
})
},
update(data) {
this.modalType = 2
this.selectChildMenu(data)
this.productModal = true
// 取消所有的选中效果
this.handleSelectAll(false)
this.productTitle = '编辑信息'
// const newChild = { id: this.id++, label: 'testtest', children: [] };
// if (!data.children) {
// this.$set(data, 'children', []);
// }
// data.children.push(newChild);
},
append(data) {
this.modalType = 1
this.selectChildMenu(data)
this.productModal = true
// 取消所有的选中效果
this.handleSelectAll(false)
this.productTitle = '新增下级菜单信息'
this.productModelAdd.dicTypeCode = ''
// const newChild = { id: this.id++, label: 'testtest', children: [] };
// if (!data.children) {
// this.$set(data, 'children', []);
// }
// data.children.push(newChild);
},
remove(node, data) {
this.$confirm('是否删除菜单?', '提示', {
confirmButtonText: '确定',
confirmButtonClass: 'common-button-primary',
cancelButtonText: '取消',
roundButton: true,
type: 'warning'
}).then(() => {
this.$http.delete("sarResource/ts-resource", {
menuId: data.id
}, res => {
}, e => {
if(e.ok){
this.$message({
type: 'success',
message: "删除成功"
})
this.selectMenu()
}else {
this.$message({
type: 'warning',
message: e.message
})
}
})
}).catch(() => {
this.$refs.selections.clearSelection()
this.$message({
type: 'info',
message: '已取消删除'
})
})
// const parent = node.parent;
// const children = parent.data.children || parent.data;
// const index = children.findIndex(d => d.id === data.id);
// children.splice(index, 1);
},
// 树节点鼠标移入移出
mouseenter(data){
console.log(data)
this.$set(data, 'show', true)
if(data.parentId !== null){
this.$set(data, 'showDel', true)
}
},
mouseleave(data){
this.$set(data, 'show', false)
this.$set(data, 'showDel', false)
},
treeClick (treeNode) {
this.selectSarMenu = treeNode
this.standCommonlySearch.menuId = treeNode.id
@@ -2193,7 +2563,7 @@ export default {
// return this.$message.warning('实施日期必须有一项为日期格式')
// }
this.isSubmit = true
this.$http.postData(this.addOrUPdateFlag === 1 ? 'lawss/sarStandardsInfo/addarStandardsInfo' : 'lawss/sarStandardsInfo/updateSarStandardsInfo', nowstandinfo, {
this.$http.postData(this.addOrUPdateFlag === 1 ? 'sarStandardsInfo/sar-standards-info/addarStandardsInfo' : 'sarStandardsInfo/sar-standards-info/updateSarStandardsInfo', nowstandinfo, {
_this: this
}, res => {
this.isSubmit = false
@@ -3414,16 +3784,21 @@ export default {
_this: this
}, res => {
this.allSelectOptions = res.data || {}
this.standSortOptions = res.data.STANDCLASSIFY // 标准类别
this.standNatureOptions = res.data.SARPROPERTY // 标准性质
this.standStateOptions = res.data.WBZTCLASS // 文本状态
this.standSystemOptions = res.data.BZTXCLASS // 标准体系
this.categoryOptions = res.data.NYLXCLASS // 能源类型
this.applyAuthOptions = res.data.SYRZCLASS // 适用认证
this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线
this.zrbmOptions = res.data.ZRBMCLASS // 责任部门
this.zrgcsOptions = res.data.ZRGCSCLASS // 责任工程师
this.txlbOptions = res.data.TXLBCLASS // 体系类别
this.countryOptions = res.data.COUNTRY
this.regionOptions = res.data.REGION // 区域
this.standSortOptions = res.data.STANDCLASSIFY
this.applyArcticOptions = res.data.PRODUCTTYPE // 根据需求文档,产品类别对应标准属性中的“适用车型”
this.standStateOptions = res.data.STANDSTATE
this.standNatureOptions = res.data.SARPROPERTY // 标准性质
this.adoptExtentOptions = res.data.DEGREESTANDARD
this.emergyKindOptions = res.data.ENERGYTYPES
this.applyAuthOptions = res.data.PROVETYPE // 适用认证下拉框
this.categoryOptions = res.data.CATEGORY // 能源种类
this.assemClassOptions = res.data.ASSEMCLASSIFY // 总成分类
this.categoryConfigOptions = res.data.CATEGORY
this.standAttributeList = res.data.RULETYPE