4e9c0faf by renchao@pashanhoo.com

style:增加注释

1 parent 00517d7a
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 16:42:17
-->
<template>
<div>
<el-form :model="ruleForm" ref="ruleForm" label-width="100px">
......@@ -26,302 +31,302 @@
</template>
<script>
import { getUuid, judgeSort, realMove, findParents, removeTreeListItem } from '@/utils/operation'
import { editDictNode, getChildDictList } from '@/api/user'
export default {
props: {
formData: {
type: Object,
default: () => { }
}
},
data () {
return {
key: 0,
keyList: [],
ruleForm: {
dcode: '',
dname: ''
},
column: [],
columns: [
{
width: '70',
renderHeader: (h, scope) => {
return (<div>
{
this.formData.isenable === '0' ?
<span>序号</span> :
<i class="el-icon-plus" onClick={() => { this.handleAdd() }} style="cursor:pointer;color:#409EFF"></i>
}
</div>)
},
render: (h, scope) => {
return (
<span>{scope.row.index}</span>
)
}
import { getUuid, judgeSort, realMove, findParents, removeTreeListItem } from '@/utils/operation'
import { editDictNode, getChildDictList } from '@/api/user'
export default {
props: {
formData: {
type: Object,
default: () => { }
}
},
data () {
return {
key: 0,
keyList: [],
ruleForm: {
dcode: '',
dname: ''
},
{
prop: 'dcode',
width: '100',
label: '字典项编码',
render: (h, scope) => {
return (
<div>
<el-input placeholder="字典项编码" disabled={this.formData.isenable == 2} v-show={scope.row.codeShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }} maxlength='8'></el-input>
column: [],
columns: [
{
width: '70',
renderHeader: (h, scope) => {
return (<div>
{
this.formData.isenable === '0' ?
<span>序号</span> :
<i class="el-icon-plus" onClick={() => { this.handleAdd() }} style="cursor:pointer;color:#409EFF"></i>
}
</div>)
},
render: (h, scope) => {
return (
<span>{scope.row.index}</span>
)
}
},
{
prop: 'dcode',
width: '100',
label: '字典项编码',
render: (h, scope) => {
return (
<div>
<el-input placeholder="字典项编码" disabled={this.formData.isenable == 2} v-show={scope.row.codeShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }} maxlength='8'></el-input>
<el-input placeholder="字典项编码" disabled={this.formData.isenable == 2} v-show={!scope.row.codeShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }} maxlength='8'></el-input>
</div>
)
}
},
{
prop: 'dname',
label: '字典项名称',
render: (h, scope) => {
return (
<div>
<el-input placeholder="字典项编码" disabled={this.formData.isenable == 2} v-show={scope.row.nameShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }}></el-input>
<el-input placeholder="字典项编码" disabled={this.formData.isenable == 2} v-show={!scope.row.codeShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }} maxlength='8'></el-input>
</div>
)
}
},
{
prop: 'dname',
label: '字典项名称',
render: (h, scope) => {
return (
<div>
<el-input placeholder="字典项编码" disabled={this.formData.isenable == 2} v-show={scope.row.nameShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }}></el-input>
<el-input placeholder="字典项名称" disabled={this.formData.isenable == 2} v-show={!scope.row.nameShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }}></el-input>
</div>
)
}
},
{
prop: 'normcode',
label: '部标编码',
width: '100',
render: (h, scope) => {
return (
<div>
<el-input placeholder="部标编码" disabled={this.formData.isenable == 2} v-show={scope.row.normcodeShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normcodeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }} maxlength='8'></el-input>
<el-input placeholder="字典项名称" disabled={this.formData.isenable == 2} v-show={!scope.row.nameShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }}></el-input>
</div>
)
}
},
{
prop: 'normcode',
label: '部标编码',
width: '100',
render: (h, scope) => {
return (
<div>
<el-input placeholder="部标编码" disabled={this.formData.isenable == 2} v-show={scope.row.normcodeShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normcodeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }} maxlength='8'></el-input>
<el-input placeholder="部标编码" disabled={this.formData.isenable == 2} v-show={!scope.row.normcodeShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normcodeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }} maxlength='8'></el-input>
</div>
)
}
},
{
prop: 'normname',
label: '部标名称',
render: (h, scope) => {
return (
<div>
<el-input placeholder="部标名称" disabled={this.formData.isenable == 2} v-show={scope.row.normnameShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normnameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }}></el-input>
<el-input placeholder="部标编码" disabled={this.formData.isenable == 2} v-show={!scope.row.normcodeShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normcodeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }} maxlength='8'></el-input>
</div>
)
}
},
{
prop: 'normname',
label: '部标名称',
render: (h, scope) => {
return (
<div>
<el-input placeholder="部标名称" disabled={this.formData.isenable == 2} v-show={scope.row.normnameShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normnameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }}></el-input>
<el-input placeholder="部标名称" disabled={this.formData.isenable == 2} v-show={!scope.row.normnameShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normnameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }}></el-input>
</div>
)
<el-input placeholder="部标名称" disabled={this.formData.isenable == 2} v-show={!scope.row.normnameShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normnameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val; this.itemShowFalse(); scope.row.codeShow = true; }}></el-input>
</div>
)
}
},
{
prop: 'isenable',
width: '160',
label: '是否禁用',
render: (h, scope) => {
return (
<el-radio-group disabled={this.formData.isenable == 2} v-model={scope.row.isenable}>
<el-radio label="1">启用</el-radio>
<el-radio label="0">禁用</el-radio>
</el-radio-group>
)
}
},
{
width: '130',
label: '移动',
render: (h, scope) => {
return (
<div>
<el-button type='text' disabled={scope.row.isTop} onClick={() => { this.moveUpward(scope.$index, scope.row) }}>上移</el-button>
<el-button type='text' disabled={scope.row.isBottom} onClick={() => { this.moveDown(scope.$index, scope.row) }}>下移</el-button >
</div >
)
}
},
{
width: '150',
label: '操作',
render: (h, scope) => {
return (
<div>
<el-button type="text" style="margin-right:10px" onClick={() => { this.handleAddSubordinate(scope.row) }}>增加下级</el-button>
<el-button type="text" style="margin-left:0" onClick={() => { this.handleMinus(scope.$index, scope.row) }}>删除</el-button>
</div>
)
}
}
},
{
prop: 'isenable',
width: '160',
label: '是否禁用',
render: (h, scope) => {
return (
<el-radio-group disabled={this.formData.isenable == 2} v-model={scope.row.isenable}>
<el-radio label="1">启用</el-radio>
<el-radio label="0">禁用</el-radio>
</el-radio-group>
)
],
tableData: []
}
},
mounted () {
if (this.formData?.bsmDict) {
this.$startLoading();
getChildDictList(this.formData.bsmDict).then(res => {
this.$endLoading();
let { result } = res
this.tableData = result ? result : []
this.tableData.forEach((item, index) => {
item.index = index + 1
})
this.tableData = judgeSort(this.tableData)
})
}
if (this.formData?.isenable == 2) {
this.column = this.columns.slice(0, 6)
} else {
this.column = this.columns
}
this.ruleForm = this.formData.rowData
this.addIndexes()
this.key++
},
methods: {
// 添加索引
addIndexes (data = this.tableData, isAdd = true) {
data.forEach((item, index) => {
if (index == 0) {
item.codeShow = true
item.nameShow = false
item.normcodeShow = false
item.normnameShow = false
} else {
item.codeShow = false
item.nameShow = false
item.normcodeShow = false
item.normnameShow = false
}
},
{
width: '130',
label: '移动',
render: (h, scope) => {
return (
<div>
<el-button type='text' disabled={scope.row.isTop} onClick={() => { this.moveUpward(scope.$index, scope.row) }}>上移</el-button>
<el-button type='text' disabled={scope.row.isBottom} onClick={() => { this.moveDown(scope.$index, scope.row) }}>下移</el-button >
</div >
)
if (isAdd) {
item.index = index + 1
}
},
{
width: '150',
label: '操作',
render: (h, scope) => {
return (
<div>
<el-button type="text" style="margin-right:10px" onClick={() => { this.handleAddSubordinate(scope.row) }}>增加下级</el-button>
<el-button type="text" style="margin-left:0" onClick={() => { this.handleMinus(scope.$index, scope.row) }}>删除</el-button>
</div>
)
if (item.children) {
this.addIndexes(item.children, false)
}
}
],
tableData: []
}
},
mounted () {
if (this.formData?.bsmDict) {
this.$startLoading();
getChildDictList(this.formData.bsmDict).then(res => {
this.$endLoading();
let { result } = res
this.tableData = result ? result : []
this.tableData.forEach((item, index) => {
item.index = index + 1
})
this.tableData = judgeSort(this.tableData)
})
}
if (this.formData?.isenable == 2) {
this.column = this.columns.slice(0, 6)
} else {
this.column = this.columns
}
this.ruleForm = this.formData.rowData
this.addIndexes()
this.key++
},
methods: {
// 添加索引
addIndexes (data = this.tableData, isAdd = true) {
data.forEach((item, index) => {
if (index == 0) {
item.codeShow = true
item.nameShow = false
item.normcodeShow = false
item.normnameShow = false
} else {
},
itemShowFalse () {
this.tableData.forEach((item, index) => {
item.codeShow = false
item.nameShow = false
item.normcodeShow = false
item.normnameShow = false
}
if (isAdd) {
item.index = index + 1
}
if (item.children) {
this.addIndexes(item.children, false)
}
})
},
itemShowFalse () {
this.tableData.forEach((item, index) => {
item.codeShow = false
item.nameShow = false
item.normcodeShow = false
item.normnameShow = false
})
},
handleMinus (index, row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
removeTreeListItem(this.tableData, row.bsmDict)
this.$message({
type: 'success',
message: '删除成功!'
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
handleSubmit () {
this.$startLoading();
editDictNode({
bsmDict: this.formData.rowData.bsmDict,
typeid: this.formData.rowData.typeid,
children: this.tableData
}).then(res => {
this.$endLoading();
if (res.code === 200) {
},
handleMinus (index, row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
removeTreeListItem(this.tableData, row.bsmDict)
this.$message({
message: '修改成功',
type: 'success'
type: 'success',
message: '删除成功!'
})
this.$popupCacel()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
handleSubmit () {
this.$startLoading();
editDictNode({
bsmDict: this.formData.rowData.bsmDict,
typeid: this.formData.rowData.typeid,
children: this.tableData
}).then(res => {
this.$endLoading();
if (res.code === 200) {
this.$message({
message: '修改成功',
type: 'success'
})
this.$popupCacel()
}
})
},
// 增加下级
handleAddSubordinate (row) {
if (!row.children) {
row.children = []
}
})
},
// 增加下级
handleAddSubordinate (row) {
if (!row.children) {
row.children = []
row.children.push(
{
dcode: '',
dname: '',
isenable: '1',
normcode: '',
normname: '',
bsmDict: getUuid(32),
typeid: row.typeid,
}
)
this.keyList = [];
this.keyList.push(row.bsmDict)
},
// 增加
handleAdd () {
this.$nextTick(() => {
let container = this.$el.querySelector('.el-table__body-wrapper');
container.scrollTop = container.scrollHeight;
})
this.tableData.push(
{
dcode: '',
dname: '',
isenable: '1',
normcode: '',
normname: '',
bsmDict: getUuid(32),
typeid: this.ruleForm.typeid,
}
)
this.addIndexes()
this.key++
},
// 上移下移
moveUpward (index, row) {
realMove(row.bsmDict, 'UP', this.tableData)
this.key++
let id = findParents(this.tableData, row.bsmDict)
this.keyList = id
},
moveDown (index, row) {
realMove(row.bsmDict, 'DOWN', this.tableData)
this.key++
let id = findParents(this.tableData, row.bsmDict)
this.keyList = id
}
row.children.push(
{
dcode: '',
dname: '',
isenable: '1',
normcode: '',
normname: '',
bsmDict: getUuid(32),
typeid: row.typeid,
}
)
this.keyList = [];
this.keyList.push(row.bsmDict)
},
// 增加
handleAdd () {
this.$nextTick(() => {
let container = this.$el.querySelector('.el-table__body-wrapper');
container.scrollTop = container.scrollHeight;
})
this.tableData.push(
{
dcode: '',
dname: '',
isenable: '1',
normcode: '',
normname: '',
bsmDict: getUuid(32),
typeid: this.ruleForm.typeid,
}
)
this.addIndexes()
this.key++
},
// 上移下移
moveUpward (index, row) {
realMove(row.bsmDict, 'UP', this.tableData)
this.key++
let id = findParents(this.tableData, row.bsmDict)
this.keyList = id
},
moveDown (index, row) {
realMove(row.bsmDict, 'DOWN', this.tableData)
this.key++
let id = findParents(this.tableData, row.bsmDict)
this.keyList = id
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "~@/styles/dialogBoxheader.scss";
@import "~@/styles/dialogBoxheader.scss";
/deep/.el-radio {
margin-right: 5px !important;
}
/deep/.el-radio {
margin-right: 5px !important;
}
</style>
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 16:31:56
-->
<template>
<div class="from-clues">
<!-- 表单部分 -->
......@@ -33,84 +38,84 @@
</div>
</template>
<script>
import table from "@/utils/mixin/table"
import { getQlxxDictList, getChildDictList, refreshDictCache } from "@/api/user.js"
import { datas, sendThis } from "./dictionaries"
import editDialog from "./components/editDialog.vue"
export default {
name: "dictionaries",
components: {
editDialog
},
mixins: [table],
mounted () {
sendThis(this);
},
data () {
return {
details: {
bsmDict: '',
isenable: 1,
rowData: {}
},
ruleForm: {
dcode: '',
dname: ''
},
tableData: {
total: 0,
columns: datas.columns(),
data: []
import table from "@/utils/mixin/table"
import { getQlxxDictList, getChildDictList, refreshDictCache } from "@/api/user.js"
import { datas, sendThis } from "./dictionaries"
import editDialog from "./components/editDialog.vue"
export default {
name: "dictionaries",
components: {
editDialog
},
mixins: [table],
mounted () {
sendThis(this);
},
data () {
return {
details: {
bsmDict: '',
isenable: 1,
rowData: {}
},
ruleForm: {
dcode: '',
dname: ''
},
tableData: {
total: 0,
columns: datas.columns(),
data: []
}
}
}
},
methods: {
// 初始化数据
queryClick () {
this.$startLoading();
getQlxxDictList({ ...this.ruleForm, ...this.pageData }).then(res => {
this.$endLoading();
let { records, total } = res.result
this.tableData.data = records ? records : []
this.tableData.total = total ? total : 0
})
},
handleRefresh () {
this.$confirm('是否确认刷新', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$startLoading()
refreshDictCache().then(res => {
if (res.code == 200) {
let refech = this.$store.dispatch('dict/generateDic')
this.$endLoading()
refech && this.$message({
message: '刷新成功',
type: 'success'
});
} else {
this.$message.error(res.message)
}
methods: {
// 初始化数据
queryClick () {
this.$startLoading();
getQlxxDictList({ ...this.ruleForm, ...this.pageData }).then(res => {
this.$endLoading();
let { records, total } = res.result
this.tableData.data = records ? records : []
this.tableData.total = total ? total : 0
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消刷新'
},
handleRefresh () {
this.$confirm('是否确认刷新', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$startLoading()
refreshDictCache().then(res => {
if (res.code == 200) {
let refech = this.$store.dispatch('dict/generateDic')
this.$endLoading()
refech && this.$message({
message: '刷新成功',
type: 'success'
});
} else {
this.$message.error(res.message)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消刷新'
});
});
});
},
// 修改
editClick (row, val) {
this.details.rowData = row
this.details.isenable = val
this.details.bsmDict = row.bsmDict
this.$popupDialog("字典信息", "system/dictionaries/components/editDialog", this.details)
},
// 修改
editClick (row, val) {
this.details.rowData = row
this.details.isenable = val
this.details.bsmDict = row.bsmDict
this.$popupDialog("字典信息", "system/dictionaries/components/editDialog", this.details)
}
}
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
@import "~@/styles/public.scss";
</style>
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 16:42:26
-->
<template>
<el-form ref="ruleForm" :model="ruleForm" label-width="100px" :rules="rules">
<el-row>
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 16:31:05
-->
<template>
<div class="from-clues">
<!-- 表单部分 -->
......@@ -198,7 +203,7 @@
"/djbworkFrameview?bsmSlsq=" +
item.bsmSlsq +
"&bestepid=" +
item.bestepid+
item.bestepid +
"&bsmBusiness=" +
"&viewtype=1"
);
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 14:47:30
-->
<template>
<div class="from-clues">
<!-- 表单部分 -->
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 14:47:36
-->
<template>
<!-- 抵押权利信息查询 -->
<div class="from-clues">
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:23:28
-->
<template>
<div class="from-clues">
<el-tabs type="card" v-model="activeName" @tab-click="handleTabClick" v-if="!isJump">
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:23:44
-->
<template>
<div class="from-clues">
<!-- 表单部分 国有建设用地使用权 -->
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:23:51
-->
<template>
<div class="from-clues">
<!-- 表单部分 -->
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:26:40
-->
<template>
<!-- 主体权利信息查询 -->
<div class="from-clues">
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:26:46
-->
<template>
<div class="from-clues">
<!-- 表单部分 -->
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:26:51
-->
<template>
<!-- 主体权利信息查询 -->
<div class="from-clues">
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:26:55
-->
<template>
<!-- 主体权利信息查询 -->
<div class="from-clues">
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:27:00
-->
<template>
<div class="from-clues">
<!-- 表单部分 -->
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:27:13
-->
<template>
<div class="from-clues">
<!-- 表单部分 国有建设用地使用权 -->
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:27:16
-->
<template>
<div class="from-clues">
<!-- 表单部分 -->
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:27:19
-->
<template>
<!-- 主体权利信息查询 -->
<div class="from-clues">
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:27:26
-->
<template>
<!-- 主体权利信息查询 -->
<div class="from-clues">
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-13 15:27:34
-->
<template>
<!-- 主体权利信息查询 -->
<div class="from-clues">
......