|
|
@@ -146,7 +146,29 @@
|
|
|
style="color: #85ce61"
|
|
|
@click="alertReport(reports.jiancebaogao, scope.row.id_)"
|
|
|
>
|
|
|
- <i class="el-icon-s-order"></i>检测报告
|
|
|
+ <i class="el-icon-s-order"></i> 检测报告
|
|
|
+ </div>
|
|
|
+ <div v-if="scope.row && scope.row.shou_quan_qian_z">
|
|
|
+ <el-popover placement="left" width="200" trigger="click">
|
|
|
+ <div
|
|
|
+ class="div_test item"
|
|
|
+ style="color: #85ce61"
|
|
|
+ slot="reference"
|
|
|
+ @click="getFile(scope.row.shou_quan_qian_z)"
|
|
|
+ >
|
|
|
+ <i class="el-icon-s-order"></i> 授权签字人PDF
|
|
|
+ </div>
|
|
|
+ <div class="three-item">
|
|
|
+ <div
|
|
|
+ style="color: #85ce61; cursor: pointer"
|
|
|
+ v-for="i in fileList"
|
|
|
+ :key="i.id_"
|
|
|
+ @click="preview(i)"
|
|
|
+ >
|
|
|
+ {{ i.fileName }}.{{ i.ext }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
</div>
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
@@ -188,6 +210,7 @@
|
|
|
<script>
|
|
|
import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
|
|
|
import GetReport from "../corresponding/getReport.js";
|
|
|
+import { SYSTEM_URL, BASE_API } from '@/api/baseUrl'
|
|
|
export default {
|
|
|
mixins: [GetReport],
|
|
|
data() {
|
|
|
@@ -215,7 +238,13 @@ export default {
|
|
|
hetong: [],
|
|
|
triggerType: "click",
|
|
|
wTBH:[],
|
|
|
- tongyonglujin:'',//检测项目通用路径
|
|
|
+ tongyonglujin: '',// 检测项目通用路径
|
|
|
+ srcUrl: '',
|
|
|
+ fileList: [],
|
|
|
+ fileType: '',
|
|
|
+ fileOption: {
|
|
|
+ user: {}
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
filters: {
|
|
|
@@ -252,16 +281,15 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
- let this_= this;
|
|
|
let sql ="select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' and (zhuang_tai_ = '报告待发放' or zhuang_tai_ = '完成') ORDER BY create_time_ DESC limit 0,20";
|
|
|
this.loadData(sql);
|
|
|
let sumsql ="select COUNT(*) AS sum FROM t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' and (zhuang_tai_ ='报告待发放' or zhuang_tai_ = '完成')";
|
|
|
curdPost("sql", sumsql).then((response) => {
|
|
|
- this_.total = response.variables.data[0].sum;
|
|
|
+ this.total = response.variables.data[0].sum;
|
|
|
});
|
|
|
let sql2 ="select id_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw WHERE id_ ='f5a95b425d444b549d5a217d4c031855'";
|
|
|
curdPost("sql", sql2).then((response) => {
|
|
|
- this_.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
|
|
|
+ this.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -360,7 +388,7 @@ export default {
|
|
|
let data = res.variables.data;
|
|
|
data.forEach(item=>{
|
|
|
if(item.id_ ==itemId){
|
|
|
- this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this_.tongyonglujin,shujuid);
|
|
|
+ this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this.tongyonglujin,shujuid);
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
@@ -525,6 +553,36 @@ export default {
|
|
|
", 20";
|
|
|
this.loadData(sql);
|
|
|
},
|
|
|
+ // 获取附件信息
|
|
|
+ getFile (data) {
|
|
|
+ this.fileList = []
|
|
|
+ let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${data}')`
|
|
|
+ curdPost('sql', sql).then(res => {
|
|
|
+ this.fileList = res.variables && res.variables.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 文件预览
|
|
|
+ preview (file) {
|
|
|
+ this.getOption(file)
|
|
|
+ this.openWindow()
|
|
|
+ this.fileType = ''
|
|
|
+ },
|
|
|
+ getOption (file) {
|
|
|
+ this.fileOption.user.id = this.$store.getters.userId
|
|
|
+ this.fileOption.user.name = this.$store.getters.name
|
|
|
+ this.fileOption.url = BASE_API() + SYSTEM_URL() + `/file/download?attachmentId=${file.id}`
|
|
|
+ this.fileOption.editUrl = BASE_API() + SYSTEM_URL() + `/file/editCallback?fileName=${file.fileName}&fileType=${file.ext}&id=${file.id}`
|
|
|
+ this.fileOption.title = file.fileName
|
|
|
+ this.fileOption.fileType = file.ext
|
|
|
+ console.log(this.fileOption)
|
|
|
+ },
|
|
|
+ openWindow () {
|
|
|
+ let routeData = this.$router.resolve({
|
|
|
+ path: '/fileView',
|
|
|
+ query: this.fileOption
|
|
|
+ })
|
|
|
+ window.open(routeData.href);
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|