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