|
@@ -77,7 +77,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else-if="item.key === 'file'">
|
|
<div v-else-if="item.key === 'file'">
|
|
|
<el-popover placement="left" width="300" trigger="click">
|
|
<el-popover placement="left" width="300" trigger="click">
|
|
|
- <div class="operate-item" slot="reference" @click="getFile(scope.row[item.field])">
|
|
|
|
|
|
|
+ <div class="operate-item" slot="reference" @click="getFile(scope.row, item.field)">
|
|
|
<i class="el-icon-s-order"></i> {{item.name}}
|
|
<i class="el-icon-s-order"></i> {{item.name}}
|
|
|
</div>
|
|
</div>
|
|
|
<div class="three-item">
|
|
<div class="three-item">
|
|
@@ -187,7 +187,7 @@
|
|
|
name: '附件',
|
|
name: '附件',
|
|
|
key: 'file',
|
|
key: 'file',
|
|
|
path: '',
|
|
path: '',
|
|
|
- field: 'suo_you_yuan_shi_',
|
|
|
|
|
|
|
+ field: 'suo_you_yuan_shi_,fu_jian_yi_',
|
|
|
hasItem: true
|
|
hasItem: true
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -257,9 +257,9 @@
|
|
|
created () {
|
|
created () {
|
|
|
this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.info.type}'`
|
|
this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.info.type}'`
|
|
|
// this.globalSql = `select * from t_lhjcbgb where bao_gao_lei_bie_ = '${this.info.type}'`
|
|
// this.globalSql = `select * from t_lhjcbgb where bao_gao_lei_bie_ = '${this.info.type}'`
|
|
|
- let sql = `${this.globalSql} order by create_time_ desc limit 0,20`
|
|
|
|
|
|
|
+ const sql = `${this.globalSql} order by create_time_ desc limit 0,20`
|
|
|
this.loadData(sql)
|
|
this.loadData(sql)
|
|
|
- let sumsql = `select count(*) as total from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.info.type}'`
|
|
|
|
|
|
|
+ const sumsql = `select count(*) as total from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.info.type}'`
|
|
|
curdPost('sql', sumsql).then((response) => {
|
|
curdPost('sql', sumsql).then((response) => {
|
|
|
this.total = response.variables.data[0].total
|
|
this.total = response.variables.data[0].total
|
|
|
})
|
|
})
|
|
@@ -287,8 +287,8 @@
|
|
|
ids.trust.push(item.wei_tuo_id_)
|
|
ids.trust.push(item.wei_tuo_id_)
|
|
|
})
|
|
})
|
|
|
// 获取合同及委托单数据用于转换ID
|
|
// 获取合同及委托单数据用于转换ID
|
|
|
- let sql1 = `select id_, he_tong_bian_hao_ as name_ from t_bjd where find_in_set(id_, '${ids.contract.join(',')}')`
|
|
|
|
|
- let sql2 = `select id_, wei_tuo_bian_hao_ as name_ from t_lhwtsqb where find_in_set(id_, '${ids.trust.join(',')}')`
|
|
|
|
|
|
|
+ const sql1 = `select id_, he_tong_bian_hao_ as name_ from t_bjd where find_in_set(id_, '${ids.contract.join(',')}')`
|
|
|
|
|
+ const sql2 = `select id_, wei_tuo_bian_hao_ as name_ from t_lhwtsqb where find_in_set(id_, '${ids.trust.join(',')}')`
|
|
|
// console.log(sql1, sql2)
|
|
// console.log(sql1, sql2)
|
|
|
curdPost('sql', sql1).then(res1 => {
|
|
curdPost('sql', sql1).then(res1 => {
|
|
|
this.contractList = res1.variables && res1.variables.data
|
|
this.contractList = res1.variables && res1.variables.data
|
|
@@ -300,18 +300,27 @@
|
|
|
},
|
|
},
|
|
|
// 获取检测项目数据
|
|
// 获取检测项目数据
|
|
|
getTesting (row) {
|
|
getTesting (row) {
|
|
|
- const { wei_tuo_id_, yang_pin_bian_hao } = row
|
|
|
|
|
|
|
+ const { wei_tuo_id_, yang_pin_bian_hao, xiu_gai_bao_gao_b } = row
|
|
|
this.testingList = []
|
|
this.testingList = []
|
|
|
- let sql = `select b.id_ as id, a.defkey_ as number, a.jian_ce_xiang_mu_ as projectName from t_mjjcnlfw a, t_lhjczb b where a.id_ = b.jian_ce_xiang_mu_ and b.wei_tuo_id_ = '${wei_tuo_id_}' and b.yang_pin_bian_hao = '${yang_pin_bian_hao}' and jian_ce_lei_xing_ = '${this.info.type}'`
|
|
|
|
|
|
|
+ const sql = `select b.id_ as id, a.defkey_ as number, a.jian_ce_xiang_mu_ as projectName from t_mjjcnlfw a, t_lhjczb b where a.id_ = b.jian_ce_xiang_mu_ and b.wei_tuo_id_ = '${wei_tuo_id_}' and b.yang_pin_bian_hao = '${yang_pin_bian_hao}' and find_in_set(b.jian_ce_xiang_mu_, '${xiu_gai_bao_gao_b}')`
|
|
|
curdPost('sql', sql).then(res => {
|
|
curdPost('sql', sql).then(res => {
|
|
|
this.testingList = res.variables && res.variables.data
|
|
this.testingList = res.variables && res.variables.data
|
|
|
// console.log(this.testingList)
|
|
// console.log(this.testingList)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- // 获取附件信息,报告表【bao_gao_pdf_, suo_you_yuan_shi_】字段
|
|
|
|
|
- getFile (key) {
|
|
|
|
|
|
|
+ // 获取附件信息,报告表【bao_gao_pdf_, suo_you_yuan_shi_, fu_jian_yi_】字段
|
|
|
|
|
+ getFile (row, key) {
|
|
|
|
|
+ let files = ''
|
|
|
|
|
+ if (key.includes(',')) {
|
|
|
|
|
+ // 多字段
|
|
|
|
|
+ let a = row.suo_you_yuan_shi_ ? row.suo_you_yuan_shi_.split(',') : []
|
|
|
|
|
+ let b = row.fu_jian_yi_ ? row.fu_jian_yi_.split(',') : []
|
|
|
|
|
+ files = a.concat(b).join(',')
|
|
|
|
|
+ } else {
|
|
|
|
|
+ files = row[key]
|
|
|
|
|
+ }
|
|
|
this.fileList = []
|
|
this.fileList = []
|
|
|
- let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${key}')`
|
|
|
|
|
|
|
+ const sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${files}')`
|
|
|
curdPost('sql', sql).then(res => {
|
|
curdPost('sql', sql).then(res => {
|
|
|
this.fileList = res.variables && res.variables.data
|
|
this.fileList = res.variables && res.variables.data
|
|
|
})
|
|
})
|
|
@@ -333,17 +342,17 @@
|
|
|
params += paramsList[item]
|
|
params += paramsList[item]
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- let sql = `${this.globalSql}${params} order by create_time_ desc limit 0,20`
|
|
|
|
|
|
|
+ const sql = `${this.globalSql}${params} order by create_time_ desc limit 0,20`
|
|
|
// console.log(sql)
|
|
// console.log(sql)
|
|
|
this.loadData(sql)
|
|
this.loadData(sql)
|
|
|
},
|
|
},
|
|
|
handleSizeChange (value) {
|
|
handleSizeChange (value) {
|
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
|
- let sql = `${this.globalSql} order by create_time_ desc limit 0,${value}`
|
|
|
|
|
|
|
+ const sql = `${this.globalSql} order by create_time_ desc limit 0,${value}`
|
|
|
this.loadData(sql)
|
|
this.loadData(sql)
|
|
|
},
|
|
},
|
|
|
handleCurrentChange (value) {
|
|
handleCurrentChange (value) {
|
|
|
- let sql = `${this.globalSql} order by create_time_ desc limit ${value},20`
|
|
|
|
|
|
|
+ const sql = `${this.globalSql} order by create_time_ desc limit ${value},20`
|
|
|
this.loadData(sql)
|
|
this.loadData(sql)
|
|
|
},
|
|
},
|
|
|
alertReport (path, id) {
|
|
alertReport (path, id) {
|
|
@@ -373,7 +382,7 @@
|
|
|
},
|
|
},
|
|
|
openWindow () {
|
|
openWindow () {
|
|
|
let routeData = this.$router.resolve({
|
|
let routeData = this.$router.resolve({
|
|
|
- path: "/fileView",
|
|
|
|
|
|
|
+ path: '/fileView',
|
|
|
query: this.fileOption
|
|
query: this.fileOption
|
|
|
})
|
|
})
|
|
|
window.open(routeData.href);
|
|
window.open(routeData.href);
|