feature(政策入库流程): 添加政策体系字段
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
title="政策体系"
|
||||
:visible.sync="visible"
|
||||
>
|
||||
<div style="flex: 1">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="treeList"
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
:expand-on-click-node="false"
|
||||
/>
|
||||
</div>
|
||||
<div class="demo-drawer-footer" style="height: 51px">
|
||||
<el-button size="mini" @click="cancel">取消</el-button>
|
||||
<el-button size="mini" type="primary" @click="submit">确定</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PolicyTree',
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
getListStand: 'sarResource/ts-resource/getListStand',
|
||||
treeList: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'menuName'
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList () {
|
||||
this.$http._getData(this.getListStand, {
|
||||
sorDivide: 'FOREIGN_LAWS',
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}).then(res => {
|
||||
if (res.ok) {
|
||||
this.treeList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
open (key) {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
key === '' ?
|
||||
this.$refs.tree.setCurrentKey() :
|
||||
this.$refs.tree.setCurrentKey(key)
|
||||
})
|
||||
},
|
||||
cancel () {
|
||||
this.visible = false
|
||||
},
|
||||
submit () {
|
||||
const currentNode = this.$refs.tree.getCurrentNode()
|
||||
if (!currentNode) {
|
||||
this.$message({
|
||||
message: '请选择政策体系',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$emit('choose', currentNode)
|
||||
this.cancel()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -201,9 +201,22 @@
|
||||
:disabled="disabled"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="政策体系" prop="menuName" class="add-form-item form-item-disabled">
|
||||
<el-input
|
||||
:value="form.menuName"
|
||||
placeholder="请选择政策体系"
|
||||
clearable
|
||||
:disabled="disabled"
|
||||
@click.native="openChoose"
|
||||
@clear="handleClear"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<SearchResult ref="SearchResultRef" :dict="dict" @dragIn="dragIn" />
|
||||
<PolicyTree ref="PolicyTree" @choose="handleChoose" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -217,6 +230,7 @@ import DatePickerFormItem from '@/components/hzwlComponents/DatePickerFormItem'
|
||||
import DataRangePickerFormItem from '@/components/hzwlComponents/DataRangePickerFormItem'
|
||||
import SelectMultipleFormItem from '@/components/hzwlComponents/SelectMultipleFormItem'
|
||||
import TextareaFormItem from '@/components/hzwlComponents/TextareaFormItem';
|
||||
import PolicyTree from '@/components/hzwlComponents/policy/PolicyTree'
|
||||
import SearchResult from './SearchResult'
|
||||
export default {
|
||||
name: 'Basic',
|
||||
@@ -228,6 +242,7 @@ export default {
|
||||
DataRangePickerFormItem,
|
||||
SelectMultipleFormItem,
|
||||
TextareaFormItem,
|
||||
PolicyTree,
|
||||
SearchResult
|
||||
},
|
||||
props: {
|
||||
@@ -268,6 +283,20 @@ export default {
|
||||
},
|
||||
dragIn (form) {
|
||||
this.$emit('dragIn', form)
|
||||
},
|
||||
openChoose (e) {
|
||||
if (e.target.className === 'el-input__icon el-icon-circle-close el-input__clear') {
|
||||
return;
|
||||
}
|
||||
this.$refs.PolicyTree.open(this.form.menuId)
|
||||
},
|
||||
handleChoose (data) {
|
||||
this.$set(this.form, 'menuName', data.menuName)
|
||||
this.$set(this.form, 'menuId', data.id)
|
||||
},
|
||||
handleClear () {
|
||||
this.$set(this.form, 'menuName', '')
|
||||
this.$set(this.form, 'menuId', '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +100,8 @@ export default {
|
||||
lawsRemark: '',
|
||||
lawsKeyPoint: '',
|
||||
lawsOriginalLink: '',
|
||||
menuId: '',
|
||||
menuName: '',
|
||||
// 实施日期
|
||||
SSRQLAWS: '',
|
||||
XRZSSRQLAWS: '',
|
||||
@@ -199,6 +201,9 @@ export default {
|
||||
lawsOriginalLink: [
|
||||
{ type: 'string', max: 500, message: '政策原文链接不能超过500个字符', trigger: 'change' }
|
||||
],
|
||||
menuName: [
|
||||
{ required: true, message: '政策体系不能为空', trigger: 'change' }
|
||||
],
|
||||
}
|
||||
// 认证清单为否 的校验
|
||||
const littleSarLawsStandRules = {
|
||||
@@ -247,6 +252,9 @@ export default {
|
||||
lawsOriginalLink: [
|
||||
{ type: 'string', max: 500, message: '政策原文链接不能超过500个字符', trigger: 'change' }
|
||||
],
|
||||
menuName: [
|
||||
{ required: true, message: '政策体系不能为空', trigger: 'change' }
|
||||
],
|
||||
}
|
||||
const roleRules = {
|
||||
prcCreateUserName: [
|
||||
|
||||
@@ -105,6 +105,8 @@ export default {
|
||||
lawsRemark: '',
|
||||
lawsKeyPoint: '',
|
||||
lawsOriginalLink: '',
|
||||
menuId: '',
|
||||
menuName: '',
|
||||
// 实施日期
|
||||
SSRQLAWS: '',
|
||||
XRZSSRQLAWS: '',
|
||||
@@ -196,6 +198,9 @@ export default {
|
||||
CYSDLAWS: [
|
||||
{ required: true, message: '我司参与深度不能为空', trigger: 'change' }
|
||||
],
|
||||
menuName: [
|
||||
{ required: true, message: '政策体系不能为空', trigger: 'change' }
|
||||
],
|
||||
}
|
||||
// 认证清单为否 的校验
|
||||
const littleSarLawsStandRules = {
|
||||
@@ -236,6 +241,9 @@ export default {
|
||||
isRelateAccess: [
|
||||
{ required: true, message: '是否纳入认证清单不能为空', trigger: 'change' }
|
||||
],
|
||||
menuName: [
|
||||
{ required: true, message: '政策体系不能为空', trigger: 'change' }
|
||||
],
|
||||
}
|
||||
const roleRules = {
|
||||
prcCreateUserName: [
|
||||
|
||||
Reference in New Issue
Block a user