|
|
|
@ -82,7 +82,7 @@ export default { |
|
|
|
param3: '', |
|
|
|
param: '', |
|
|
|
conSql: '', |
|
|
|
param4: this.$store.state.user.site, |
|
|
|
param4: '', |
|
|
|
dataList: [], |
|
|
|
baseListData: { |
|
|
|
caption1: '', |
|
|
|
@ -103,11 +103,12 @@ export default { |
|
|
|
methods: { |
|
|
|
|
|
|
|
// 获取 用户的配置 |
|
|
|
init(tagNo,param,conSql) { |
|
|
|
init(tagNo,param,conSql,siteValue) { |
|
|
|
this.tagNo = tagNo |
|
|
|
this.visible = true; |
|
|
|
this.param = param != null && param !== undefined ? String(param) : '' |
|
|
|
this.conSql = conSql?conSql: '' |
|
|
|
this.param4 = siteValue != null && siteValue !== undefined ? String(siteValue).trim() : String(this.$store.state.user.site || '').trim() |
|
|
|
// 根据 tagNo 获取列表 |
|
|
|
getChooselist({"tagNo": tagNo}).then(({data}) => { |
|
|
|
this.columnList = [] |
|
|
|
@ -185,7 +186,7 @@ export default { |
|
|
|
if (this.tagNo <1000 && this.tagNo !== 93){ |
|
|
|
console.log(this.tagNo) |
|
|
|
if (this.param4) { |
|
|
|
sql = this.appendCondition(sql, "site=" + this.param4) |
|
|
|
sql = this.appendCondition(sql, "site='" + this.escapeSqlLiteral(this.param4) + "'") |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.conSql && this.conSql.trim() !== '') { |
|
|
|
@ -321,6 +322,9 @@ export default { |
|
|
|
: (mainSql + " where " + condition) |
|
|
|
return orderSql ? (result + " " + orderSql) : result |
|
|
|
}, |
|
|
|
escapeSqlLiteral(value) { |
|
|
|
return String(value || '').replace(/'/g, "''") |
|
|
|
}, |
|
|
|
getRowData(row) { |
|
|
|
this.visible = false |
|
|
|
this.$emit('getBaseData',row) |
|
|
|
@ -331,7 +335,7 @@ export default { |
|
|
|
this.param2='' |
|
|
|
this.param3= '' |
|
|
|
this.param= '' |
|
|
|
this.param4=this.$store.state.user.site |
|
|
|
this.param4='' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|