eb854ff0 by yuanbo

增加注释

1 parent 38948b74
......@@ -203,6 +203,12 @@
},
methods: {
// 添加索引
/**
* @description: 添加索引
* @param {*} data
* @param {*} isAdd
* @author: renchao
*/
addIndexes (data = this.tableData, isAdd = true) {
data.forEach((item, index) => {
if (index == 0) {
......@@ -224,6 +230,10 @@
}
})
},
/**
* @description: itemShowFalse
* @author: renchao
*/
itemShowFalse () {
this.tableData.forEach((item, index) => {
item.codeShow = false
......@@ -232,6 +242,12 @@
item.normnameShow = false
})
},
/**
* @description: handleMinus
* @param {*} index
* @param {*} row
* @author: renchao
*/
handleMinus (index, row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
......@@ -250,6 +266,10 @@
})
})
},
/**
* @description: handleSubmit
* @author: renchao
*/
handleSubmit () {
this.$startLoading();
editDictNode({
......@@ -268,6 +288,11 @@
})
},
// 增加下级
/**
* @description: 增加下级
* @param {*} row
* @author: renchao
*/
handleAddSubordinate (row) {
if (!row.children) {
row.children = []
......@@ -287,6 +312,10 @@
this.keyList.push(row.bsmDict)
},
// 增加
/**
* @description: 增加
* @author: renchao
*/
handleAdd () {
this.$nextTick(() => {
let container = this.$el.querySelector('.el-table__body-wrapper');
......@@ -307,12 +336,24 @@
this.key++
},
// 上移下移
/**
* @description: 上移下移
* @param {*} index
* @param {*} row
* @author: renchao
*/
moveUpward (index, row) {
realMove(row.bsmDict, 'UP', this.tableData)
this.key++
let id = findParents(this.tableData, row.bsmDict)
this.keyList = id
},
/**
* @description: moveDown
* @param {*} index
* @param {*} row
* @author: renchao
*/
moveDown (index, row) {
realMove(row.bsmDict, 'DOWN', this.tableData)
this.key++
......
......@@ -71,6 +71,10 @@
},
methods: {
// 初始化数据
/**
* @description: 初始化数据
* @author: renchao
*/
queryClick () {
this.$startLoading();
getQlxxDictList({ ...this.ruleForm, ...this.pageData }).then(res => {
......@@ -80,6 +84,10 @@
this.tableData.total = total ? total : 0
})
},
/**
* @description: handleRefresh
* @author: renchao
*/
handleRefresh () {
this.$confirm('是否确认刷新', '提示', {
confirmButtonText: '确定',
......@@ -107,6 +115,12 @@
});
},
// 修改
/**
* @description: 修改
* @param {*} row
* @param {*} val
* @author: renchao
*/
editClick (row, val) {
this.details.rowData = row
this.details.isenable = val
......
......@@ -84,6 +84,10 @@
},
methods: {
//表单提交
/**
* @description: 表单提交
* @author: renchao
*/
submitForm () {
if (this.loadStatus == '1') {
return this.$message.error("模板设计保存中,请等待...")
......@@ -101,6 +105,10 @@
});
},
//新增
/**
* @description: 新增
* @author: renchao
*/
addTemplate () {
addPrintTemplate(this.ruleForm).then(res => {
if (res.code == 200) {
......@@ -113,6 +121,10 @@
})
},
//编辑
/**
* @description: 编辑
* @author: renchao
*/
editTemplate () {
editPrintTemplate(this.ruleForm).then(res => {
if (res.code == 200) {
......@@ -124,6 +136,10 @@
}
})
},
/**
* @description: closeDialog
* @author: renchao
*/
closeDialog () {
this.$popupCacel()
this.ruleForm = {
......@@ -136,11 +152,20 @@
this.loadStatus = '0'
this.editFlag = false;
},
/**
* @description: getDetailInfo
* @param {*} row
* @author: renchao
*/
getDetailInfo (item) {
this.ruleForm = item;
this.editFlag = true;
},
//设计打印模板
/**
* @description: 设计打印模板
* @author: renchao
*/
designByPRGData () {
let that = this;
that.loadStatus = '1';
......
......@@ -63,6 +63,10 @@
}
},
methods: {
/**
* @description: fetchData
* @author: renchao
*/
fetchData () {
selectPrintTemplateList({ ...this.pageData }).then(res => {
if (res.code == 200) {
......@@ -73,14 +77,28 @@
})
},
//打开新增弹窗
/**
* @description: 打开新增弹窗
* @author: renchao
*/
openAddDialog () {
this.$popupDialog("新增打印模板", "system/dymbgl/components/editDialog", {}, "35%")
},
//打开编辑弹窗
/**
* @description: 打开编辑弹窗
* @param {*} item
* @author: renchao
*/
openEditDialog (item) {
this.$popupDialog("编辑打印模板", "system/dymbgl/components/editDialog", item, "35%")
},
//删除数据
/**
* @description: 删除数据
* @param {*} item
* @author: renchao
*/
removeTemplate (item) {
this.$confirm("确定要删除吗, 是否继续?", "提示", {
confirmButtonText: "确定",
......