|
@@ -176,7 +176,6 @@
|
|
|
this.taheus = this.$route.query.tables
|
|
|
this.taheusid = this.$route.query.id
|
|
|
this.deledlid.idList.push(this.$route.query.id)
|
|
|
- console.log(this.deledlid)
|
|
|
// tab
|
|
|
this.edingelsietab()
|
|
|
this.init()
|
|
@@ -188,13 +187,10 @@
|
|
|
this.$set(this.queryParams,obj,cont)
|
|
|
},
|
|
|
handleChange(val) {
|
|
|
- console.log(val);
|
|
|
},
|
|
|
enditTab(index) {
|
|
|
this.num = index
|
|
|
- console.log(index)
|
|
|
if(this.num == 0){
|
|
|
- console.log(34567)
|
|
|
this.tabledeLise.table = this.tabldie[index].tableName
|
|
|
this.formeanti.table = this.tabldie[index].tableName
|
|
|
this.forme.table = this.tabldie[index].tableName
|
|
@@ -208,10 +204,6 @@
|
|
|
this.inittwo()
|
|
|
this.foremliseju()
|
|
|
}
|
|
|
- // this.tableZbie.table = this.tabldie[index].tableName
|
|
|
- // this.tableZbie.fixedData.id = this.tabldie[index].id
|
|
|
- // this.edingelsie()
|
|
|
- // this.init()
|
|
|
},
|
|
|
// 按钮
|
|
|
init() {
|
|
@@ -223,11 +215,7 @@
|
|
|
this.jeigneutwo = []
|
|
|
this.jeigneu = []
|
|
|
this.jeigneu = data.buttonList.split('')
|
|
|
- console.log(data.buttonList)
|
|
|
- console.log(this.jeigneu)
|
|
|
this.jeigneu.filter(route => {
|
|
|
- // route.dept_id = route.dept_id.value
|
|
|
- console.log(route)
|
|
|
if (route == 'A') {
|
|
|
if (this.formy.id == -1) {
|
|
|
route = '保存'
|
|
@@ -270,26 +258,20 @@
|
|
|
})
|
|
|
this.jeigneutwo.push('刷新')
|
|
|
this.jeigneutwo.push('返回')
|
|
|
- console.log(this.queryData, 567)
|
|
|
// 图片的显示隐藏
|
|
|
if(this.queryData.showData.length !==0){
|
|
|
this.queryData.showData.filter(route => {
|
|
|
if(route.cssClass !== null){
|
|
|
this.imgShoew = route.cssClass
|
|
|
if(route.cssClass == 2 || route.cssClass == 4 ){
|
|
|
- console.log(34)
|
|
|
- // || route.mask.slice(3,4) == '0'
|
|
|
route.hrChildren.filter(routers =>{
|
|
|
|
|
|
routers.isonliy = true
|
|
|
})
|
|
|
- // route.routers = true
|
|
|
}else{
|
|
|
- console.log(123)
|
|
|
route.hrChildren.filter(routers =>{
|
|
|
routers.isonliy = false
|
|
|
})
|
|
|
- // route.isonliy = false
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -305,11 +287,7 @@
|
|
|
this.jeigneutwo = []
|
|
|
this.jeigneu = []
|
|
|
this.jeigneu = data.buttonList.split('')
|
|
|
- console.log(data.buttonList)
|
|
|
- console.log(this.jeigneu)
|
|
|
this.jeigneu.filter(route => {
|
|
|
- // route.dept_id = route.dept_id.value
|
|
|
- console.log(route)
|
|
|
if (route == 'A') {
|
|
|
route = '新增'
|
|
|
this.jeigneutwo.push(route)
|
|
@@ -346,55 +324,41 @@
|
|
|
}
|
|
|
|
|
|
})
|
|
|
- // this.jeigneutwo.push('刷新')
|
|
|
- // this.jeigneutwo.push('返回')
|
|
|
})
|
|
|
},
|
|
|
// 数据信息
|
|
|
edingelsie() {
|
|
|
- console.log(1234)
|
|
|
getQueryList(
|
|
|
this.tabledeLise
|
|
|
).then(res => {
|
|
|
let data = res.data
|
|
|
this.taleLisst = data
|
|
|
- // console.log(this.queryData.queryList)
|
|
|
})
|
|
|
},
|
|
|
// tab数据
|
|
|
edingelsietab() {
|
|
|
- console.log(4566)
|
|
|
geteditindeTab(this.tableZbietabg).then(response => {
|
|
|
this.tabldie = [{tableComment:'主表数据',tableName:this.taheus}]
|
|
|
this.tabldie =this.tabldie.concat(response.data.ref)
|
|
|
if (this.tabldie.length !== 1) {
|
|
|
- // this.tableZbie.table = this.tabldie[0].tableName
|
|
|
- // this.tableZbie.fixedData.id = this.tabldie[0].id
|
|
|
- // this.foremliseju()
|
|
|
+
|
|
|
} else {
|
|
|
this.msgSuccess("暂无tab数据");
|
|
|
this.$router.go(-1)
|
|
|
}
|
|
|
- // this.msgSuccess("反提交成功");
|
|
|
- // this.open = false;
|
|
|
- // this.getList();
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
// 列表数据
|
|
|
foremliseju(){
|
|
|
listIndex(this.queryParamslist).then(res => {
|
|
|
- console.log(res)
|
|
|
if(res.code == 200){
|
|
|
let data = res.data
|
|
|
this.postList = data
|
|
|
this.total = res.data.total - 0
|
|
|
}else{
|
|
|
- console.log(876)
|
|
|
- // this.postList = []
|
|
|
}
|
|
|
this.loading = false
|
|
|
- console.log(this.total)
|
|
|
- console.log(this.postList,567)
|
|
|
|
|
|
})
|
|
|
},
|
|
@@ -404,7 +368,6 @@
|
|
|
}
|
|
|
},
|
|
|
handleQuery(index) {
|
|
|
- console.log(index, 4)
|
|
|
for (let item of this.queryData.showData) {
|
|
|
for (var i = 0; i < item.hrChildren.length; i++) {
|
|
|
if (item.hrChildren[i].htmlType == 'checkbox') {
|
|
@@ -435,36 +398,23 @@
|
|
|
this.handleDelete(this.deledlid)
|
|
|
} else if (index == '提交') {
|
|
|
//提交 保存
|
|
|
- // this.formeanti.table = 'obj_test'
|
|
|
this.formeanti.commitData = []
|
|
|
this.formy.status = 1
|
|
|
- // this.formy.id = 0
|
|
|
this.formeanti.commitData.push(this.formy)
|
|
|
- console.log(this.formeanti)
|
|
|
this.antiSubmission()
|
|
|
} else if (index == '反提交') {
|
|
|
//反提交 保存
|
|
|
- // this.formeanti.table = 'obj_test'
|
|
|
this.formeanti.commitData = []
|
|
|
this.formy.status = 2
|
|
|
- // this.formy.id = 0
|
|
|
this.formeanti.commitData.push(this.formy)
|
|
|
- console.log(this.formeanti)
|
|
|
this.antiSubmission()
|
|
|
} else if (index == '保存') {
|
|
|
// 修改
|
|
|
- // this.forme.table = 'obj_test'
|
|
|
- // this.forme.objId = 1
|
|
|
this.forme.fixedData = this.queryParams
|
|
|
this.submitForm()
|
|
|
} else if (index == '返回') {
|
|
|
- // if(this.xidugje ==0){
|
|
|
- // this.$router.go(-2)
|
|
|
- // }else{
|
|
|
this.$router.go(-1)
|
|
|
- // }
|
|
|
} else if (index == '刷新') {
|
|
|
- // this.xidugje = 1
|
|
|
this.reload()
|
|
|
}else if(index == '新增'){
|
|
|
this.routerFn(-1, this.tabName)
|
|
@@ -474,16 +424,13 @@
|
|
|
return
|
|
|
}
|
|
|
const id = this.ids.join(',')
|
|
|
- console.log(12346)
|
|
|
this.routerFn(id, this.tabName)
|
|
|
}
|
|
|
|
|
|
- console.log(this.forme)
|
|
|
// this.getList();
|
|
|
},
|
|
|
/** 新增 修改提交按钮 */
|
|
|
submitForm: function() {
|
|
|
- console.log(3456)
|
|
|
this.$refs["queryForm"].validate(valid => {
|
|
|
if (valid) {
|
|
|
addbjectSave(this.forme).then(response => {
|
|
@@ -504,7 +451,6 @@
|
|
|
tableSubimt(this.formeanti).then(response => {
|
|
|
this.msgSuccess("提交成功");
|
|
|
this.$router.go(-1)
|
|
|
- // this.open = false;
|
|
|
// this.getList();
|
|
|
});
|
|
|
} else if (this.formy.status == 2) {
|
|
@@ -512,7 +458,6 @@
|
|
|
tableSubimtanit(this.formeanti).then(response => {
|
|
|
this.msgSuccess("反提交成功");
|
|
|
this.$router.go(-1)
|
|
|
- // this.open = false;
|
|
|
// this.getList();
|
|
|
});
|
|
|
}
|
|
@@ -521,7 +466,6 @@
|
|
|
},
|
|
|
//删除
|
|
|
handleDelete(index) {
|
|
|
- console.log(index)
|
|
|
if(this.num == 0){
|
|
|
this.$confirm('是否确认删除', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -539,7 +483,7 @@
|
|
|
this.msgInfo('请勾选一条信息')
|
|
|
return
|
|
|
}
|
|
|
- console.log(this.ids)
|
|
|
+ // console.log(this.ids)
|
|
|
var that = this
|
|
|
index.idList = this.ids
|
|
|
index.table = this.tabName
|
|
@@ -559,12 +503,10 @@
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
- console.log(this.ids)
|
|
|
this.single = selection.length != 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
routerFn(id, tables) {
|
|
|
- console.log(157)
|
|
|
if (this.queryDatatwo.viewType == 'crud') {
|
|
|
this.$router.push({
|
|
|
path: 'table',
|
|
@@ -586,7 +528,6 @@
|
|
|
// 搜索
|
|
|
handleQueryiu(){
|
|
|
for(let item of this.queryDatatwo.queryList){
|
|
|
- // for(var i = 0 ; i < item.hrChildren.length ; i++){
|
|
|
if(item.htmlType == 'checkbox'){
|
|
|
this.queryParamstwoi[item.columnName] = this.$refs[item.columnName][0].config
|
|
|
}else if(item.htmlType == 'imageUpload' || item.htmlType == 'fileUpload'){
|
|
@@ -594,7 +535,6 @@
|
|
|
} else{
|
|
|
this.queryParamstwoi[item.columnName] = this.$refs[item.columnName][0].config[item.columnName]
|
|
|
}
|
|
|
- // }
|
|
|
|
|
|
}
|
|
|
for(var items in this.queryParamstwoi){
|
|
@@ -604,7 +544,6 @@
|
|
|
}
|
|
|
this.queryParamslist.fixedData.condition = this.queryParamstwoi
|
|
|
this.foremliseju()
|
|
|
- console.log(this.queryParamstwoi)
|
|
|
},
|
|
|
resetQuery(){
|
|
|
this.resetForm("queryParamstwoi");
|