Merge branch 'fix_foton_20231213' into 'master'
Fix foton 20231213 See merge request laws-foton-slrs/foton-laws-system-front!136
This commit is contained in:
@@ -42,9 +42,9 @@
|
||||
<div class="basic-information-content">
|
||||
<!--<p style="" class="half"><label style=" margin-right: 157px;">政策分类</label><span>{{ sarStandardsInfoEO.lawsType }}</span></p>-->
|
||||
<p style="" class="half"><label style=" margin-right: 132px;">1级政策分类</label><span>{{ sarStandardsInfoEO.lawTypeFirstLevelName || '-' }}</span></p>
|
||||
<p style="" class="half"><label style=" margin-right: 132px;">2级政策分类</label><span>{{ sarStandardsInfoEO.lawTypeFourthLevelName || '-' }}</span></p>
|
||||
<p style="" class="half"><label style=" margin-right: 132px;">3级政策分类</label><span>{{ sarStandardsInfoEO.lawTypeSecondLevelName || '-' }}</span></p>
|
||||
<p style="" class="half"><label style=" margin-right: 132px;">4级政策分类</label><span>{{ sarStandardsInfoEO.lawTypeThirdLevelName || '-' }}</span></p>
|
||||
<p style="" class="half"><label style=" margin-right: 132px;">2级政策分类</label><span>{{ sarStandardsInfoEO.lawTypeSecondLevelName || '-' }}</span></p>
|
||||
<p style="" class="half"><label style=" margin-right: 132px;">3级政策分类</label><span>{{ sarStandardsInfoEO.lawTypeThirdLevelName || '-' }}</span></p>
|
||||
<p style="" class="half"><label style=" margin-right: 132px;">4级政策分类</label><span>{{ sarStandardsInfoEO.lawTypeFourthLevelName || '-' }}</span></p>
|
||||
<!--<p style="" class="half"><label style=" margin-right: 157px;">政策编号</label><span>{{ sarStandardsInfoEO.lawsNumber }}</span></p>-->
|
||||
<p class="half"><label style=" margin-right: 157px;">政策名称</label><span>{{ sarStandardsInfoEO.lawsName || '-' }}</span></p>
|
||||
<p class="half"><label style=" margin-right: 157px;">英文名称</label><span>{{ sarStandardsInfoEO.lawsEnName || '-' }}</span></p>
|
||||
|
||||
@@ -1,68 +1,73 @@
|
||||
<template>
|
||||
<div style="width: 100%" class="wrapper">
|
||||
<el-input
|
||||
placeholder="输入树状图体系"
|
||||
v-model="filterText">
|
||||
</el-input>
|
||||
v-model="filterText"
|
||||
placeholder="输入树状图体系"
|
||||
/>
|
||||
<div class="tree">
|
||||
<el-card style="height: 100%;padding-right: 120px;overflow-y:auto">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
node-key="id"
|
||||
class="tree-line"
|
||||
icon-class="icon-tree"
|
||||
:indent="0"
|
||||
:props="props"
|
||||
:data="treeList"
|
||||
:default-expanded-keys="['64df1d5522bb49c09af6']"
|
||||
highlight-current
|
||||
@node-click="treeClick"
|
||||
:filter-node-method="filterNode">
|
||||
<span class="custom-tree-node" slot-scope="{ node, data }" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
|
||||
<span :class="data.children.length !== 0 ? 'is-show' : 'is-leaf-none'"></span>
|
||||
<span style="font-size:12px"> {{ node.label }} </span>
|
||||
<span>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
v-show="data.show"
|
||||
v-btn-permission="'a3109949cc30dae1ef523c037b2651b8'"
|
||||
@click="() => append(data)">
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
v-show="data.show"
|
||||
v-btn-permission="'61a33c05ed689934f7d4a0de4220c9ce'"
|
||||
@click="() => update(data)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
v-show="data.showDel"
|
||||
v-btn-permission="'b123231eb8c42b2a61e3dc5f59654f79'"
|
||||
@click="() => remove(node, data)">
|
||||
删除
|
||||
</el-button>
|
||||
</span>
|
||||
ref="tree"
|
||||
node-key="id"
|
||||
class="tree-line"
|
||||
icon-class="icon-tree"
|
||||
:indent="0"
|
||||
:props="props"
|
||||
:data="treeList"
|
||||
:default-expanded-keys="['64df1d5522bb49c09af6']"
|
||||
highlight-current
|
||||
:filter-node-method="filterNode"
|
||||
:expand-on-click-node="false"
|
||||
@node-click="treeClick"
|
||||
>
|
||||
<span slot-scope="{ node, data }" class="custom-tree-node" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
|
||||
<span :class="data.children.length !== 0 ? 'is-show' : 'is-leaf-none'" />
|
||||
<span style="font-size:12px"> {{ node.label }} </span>
|
||||
<span>
|
||||
<el-button
|
||||
v-show="data.show"
|
||||
v-btn-permission="'a3109949cc30dae1ef523c037b2651b8'"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="() => append(data)"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-show="data.show"
|
||||
v-btn-permission="'61a33c05ed689934f7d4a0de4220c9ce'"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="() => update(data)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-show="data.showDel"
|
||||
v-btn-permission="'b123231eb8c42b2a61e3dc5f59654f79'"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="() => remove(node, data)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-card>
|
||||
</div>
|
||||
<addStructure ref="addStructureRef" @selectMenuList="selectMenuList"></addStructure>
|
||||
<addStructure ref="addStructureRef" @selectMenuList="selectMenuList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import addStructure from "./addStructure";
|
||||
import addStructure from './addStructure';
|
||||
export default {
|
||||
name: "policyTree",
|
||||
name: 'PolicyTree',
|
||||
components: {
|
||||
addStructure
|
||||
},
|
||||
data(){
|
||||
data () {
|
||||
return {
|
||||
treeList: [],
|
||||
filterText: '', // 企业标准库过滤
|
||||
@@ -72,14 +77,14 @@ export default {
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.selectMenuList()
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
filterText (val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
},
|
||||
created () {
|
||||
this.selectMenuList()
|
||||
},
|
||||
methods: {
|
||||
selectMenuList () {
|
||||
this.$http.get('sarResource/ts-resource/getListStand', {
|
||||
@@ -92,20 +97,20 @@ export default {
|
||||
})
|
||||
this.$emit('treeClick', {})
|
||||
},
|
||||
filterNode(value, data) {
|
||||
filterNode (value, data) {
|
||||
if (!value) return true;
|
||||
return data.menuName.indexOf(value) !== -1;
|
||||
},
|
||||
treeClick (treeNode) {
|
||||
this.$emit('treeClick', treeNode)
|
||||
},
|
||||
append(data) {
|
||||
append (data) {
|
||||
this.$refs.addStructureRef.append(data)
|
||||
},
|
||||
update(data) {
|
||||
update (data) {
|
||||
this.$refs.addStructureRef.update(data)
|
||||
},
|
||||
remove(node, data) {
|
||||
remove (node, data) {
|
||||
this.$confirm('是否删除菜单?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
@@ -113,14 +118,14 @@ export default {
|
||||
roundButton: true,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http.put("sarResource/ts-resource/delResourceById", {
|
||||
this.$http.put('sarResource/ts-resource/delResourceById', {
|
||||
resourceId: data.id
|
||||
}, res => {
|
||||
}, e => {
|
||||
if(e.ok){
|
||||
if(e.ok) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: "删除成功"
|
||||
message: '删除成功'
|
||||
})
|
||||
this.selectMenuList()
|
||||
}else {
|
||||
@@ -138,13 +143,13 @@ export default {
|
||||
})
|
||||
},
|
||||
// 树节点鼠标移入移出
|
||||
mouseenter(data){
|
||||
mouseenter (data) {
|
||||
this.$set(data, 'show', true)
|
||||
if(data.parentId !== null && data.id !== 'zcwdsc'){
|
||||
if(data.parentId !== null && data.id !== 'zcwdsc') {
|
||||
this.$set(data, 'showDel', true)
|
||||
}
|
||||
},
|
||||
mouseleave(data){
|
||||
mouseleave (data) {
|
||||
this.$set(data, 'show', false)
|
||||
this.$set(data, 'showDel', false)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user